JvmElementVisitor<Boolean> (@NotNull Project project, @NotNull HighlightSink sink, boolean isOnTheFly) { return new DefaultJvmElementVisitor<>() { @Override public Boolean visitClass(@NotNull JvmClass clazz) { PsiElement sourceElement = clazz.getSourceElement(); if (!(sourceElement instanceof PsiClass)) { return null; } checkClass(project, (PsiClass)sourceElement, sink); return false; } }; }