void (@NotNull PsiReferenceExpression expression) { super.visitReferenceExpression(expression); final String name = expression.getReferenceName(); if (!HardcodedMethodConstants.OUT.equals(name) && !HardcodedMethodConstants.ERR.equals(name)) { return; } final PsiElement referent = expression.resolve(); if (!(referent instanceof PsiField field)) { return; } final PsiClass containingClass = field.getContainingClass(); if (containingClass == null) { return; } final String className = containingClass.getQualifiedName(); if (!"java.lang.System".equals(className)) { return; } registerError(expression, expression); }