void (@NotNull PsiAnnotation annotation) { super.visitAnnotation(annotation); if (!JCiPUtil.isGuardedByAnnotation(annotation)) { return; } final PsiMember member = PsiTreeUtil.getParentOfType(annotation, PsiMember.class); if (member == null) { return; } if (member.hasModifierProperty(PsiModifier.STATIC)) { return; } final String guardValue = JCiPUtil.getGuardValue(annotation); if (guardValue == null) { return; } final PsiAnnotationMemberValue guardRef = annotation.findAttributeValue("value"); if (guardRef == null) { return; } final PsiClass containingClass = PsiTreeUtil.getParentOfType(annotation, PsiClass.class); if (containingClass == null) { return; } final PsiField guardField = containingClass.findFieldByName(guardValue, true); if (guardField == null) { return; } if (!guardField.hasModifierProperty(PsiModifier.STATIC)) { return; } myHolder.registerProblem(guardRef, JavaAnalysisBundle.message("instance.member.guarded.by.static.ref.loc")); }