public static boolean hasEnclosingInstanceInScope(@NotNull PsiClass aClass,
                                                    PsiElement scope,
                                                    @NotNull Condition<? super PsiClass> isSuperClassAccepted,
                                                    boolean isTypeParamsAccepted) {
    return findEnclosingInstanceInScope(aClass, scope, isSuperClassAccepted, isTypeParamsAccepted) != null;
  }
public static boolean hasEnclosingInstanceInScope(@NotNull PsiClass aClass,
                                                    PsiElement scope,
                                                    @NotNull Condition<? super PsiClass> isSuperClassAccepted,
                                                    boolean isTypeParamsAccepted)