NullabilityAnnotationInfo (PsiType eachType) { for (PsiAnnotation annotation : eachType.getAnnotations()) { String qualifiedName = annotation.getQualifiedName(); NullableNotNullManager nnn = NullableNotNullManager.getInstance(annotation.getProject()); Optional<Nullability> optionalNullability = nnn.getAnnotationNullability(qualifiedName); if (optionalNullability.isPresent()) { Nullability nullability = optionalNullability.get(); if (nullability == Nullability.NULLABLE && shouldIgnoreAnnotation(annotation)) continue; return new NullabilityAnnotationInfo(annotation, nullability, false); } } if (eachType instanceof PsiClassType) { PsiElement context = ((PsiClassType)eachType).getPsiContext(); if (context != null) { return NullableNotNullManager.getInstance(context.getProject()).findDefaultTypeUseNullability(context); } } return null; }