NlsInfo (@Nullable PsiClass annotationClass) { if (annotationClass == null) return NlsUnspecified.UNKNOWN; NlsInfo baseInfo = NlsUnspecified.UNKNOWN; String prefix = ""; String suffix = ""; for (PsiAnnotation metaAnno : annotationClass.getAnnotations()) { if (metaAnno.hasQualifiedName(NLS_CONTEXT)) { prefix = StringUtil.notNullize(AnnotationUtil.getStringAttributeValue(metaAnno, "prefix")); suffix = StringUtil.notNullize(AnnotationUtil.getStringAttributeValue(metaAnno, "suffix")); } else { NlsInfo info = fromAnnotation(metaAnno); if (info != NlsUnspecified.UNKNOWN) { baseInfo = info; } } } if (baseInfo instanceof Localized) { return ((Localized)baseInfo).withPrefixAndSuffix(prefix, suffix).withAnnotation(annotationClass.getQualifiedName()); } return baseInfo; }