NlsInfo (PsiType type) { if (type == null) return NlsUnspecified.UNKNOWN; Ref<NlsInfo> result = Ref.create(NlsUnspecified.UNKNOWN); InheritanceUtil.processSuperTypes(type, true, eachType -> { NlsInfo info = fromAnnotationOwner(eachType); if (info != NlsUnspecified.UNKNOWN) { result.set(info); return false; } return !(eachType instanceof PsiClassType) || PsiUtil.resolveClassInClassTypeOnly(eachType) instanceof PsiTypeParameter; }); return result.get(); }