boolean (@NotNull PsiModifierListOwner owner, boolean checkBases, boolean skipExternal) { Project project = owner.getProject(); NullableNotNullManager manager = NullableNotNullManager.getInstance(project); NullabilityAnnotationInfo info = manager.findEffectiveNullabilityInfo(owner); if (info == null || info.isInferred() || info.getNullability() != Nullability.NOT_NULL) return false; if (!checkBases && info.getInheritedFrom() != null) return false; if (skipExternal && info.isExternal()) return false; return true; }