void (PsiJavaCodeReferenceElement reference) { if (reference == null) { return; } final PsiType[] typeParameters = reference.getTypeParameters(); if (typeParameters.length > 0) { return; } final PsiElement element = reference.resolve(); if (!(element instanceof PsiClass aClass)) { return; } final PsiElement qualifier = reference.getQualifier(); if (qualifier instanceof PsiJavaCodeReferenceElement qualifierReference) { if (!aClass.hasModifierProperty(PsiModifier.STATIC) && !aClass.isInterface() && !aClass.isEnum()) { checkReferenceElement(qualifierReference); } } if (!aClass.hasTypeParameters()) { return; } reportProblem(reference); }