public static boolean isClassReference(@NotNull PsiElement expression) {
    if (!(expression instanceof GrReferenceExpression ref)) return false;
    GrExpression qualifier = ref.getQualifier();
    if (!"class".equals(ref.getReferenceName())) return false;
    return qualifier != null && getClassReferenceFromExpression(qualifier) != null;
  }
public static boolean isClassReference(@NotNull PsiElement expression)