void (@NotNull PsiField field) { //no call to super, so we don't drill into anonymous classes final PsiClass containingClass = field.getContainingClass(); if (containingClass == null) { return; } if (!containingClass.isInterface() && !containingClass.isAnnotationType()) { return; } registerFieldError(field); }