PsiElementVisitor (@NotNull final ProblemsHolder holder, final boolean isOnTheFly) { return new JavaElementVisitor() { @Override public void visitReferenceExpression(@NotNull PsiReferenceExpression expression) { checkAccessStaticMemberViaInstanceReference(expression, holder); } }; }