PsiElementVisitor (@NotNull ProblemsHolder holder, boolean isOnTheFly) { if (!(holder.getFile() instanceof PsiClassOwner)) { return PsiElementVisitor.EMPTY_VISITOR; } return new JavaElementVisitor() { @Override public void visitClass(@NotNull PsiClass aClass) { final String name = aClass.getName(); if (name == null) return; checkName(aClass, name, holder); } }; }