public class InheritanceUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static PsiClass |
findEnclosingInstanceInScope(PsiClass aClass,
PsiElement scope,
Condition<? super PsiClass> isSuperClassAccepted,
boolean isTypeParamsAccepted) |
static PsiClass |
getCircularClass(PsiClass aClass)
Detects a circular inheritance
|
static java.util.LinkedHashSet<PsiClass> |
getSuperClasses(PsiClass aClass) |
static void |
getSuperClasses(PsiClass aClass,
java.util.Set<? super PsiClass> results,
boolean includeNonProject)
Gets all superclasses.
|
static boolean |
hasEnclosingInstanceInScope(PsiClass aClass,
PsiElement scope,
boolean isSuperClassAccepted,
boolean isTypeParamsAccepted) |
static boolean |
hasEnclosingInstanceInScope(PsiClass aClass,
PsiElement scope,
Condition<? super PsiClass> isSuperClassAccepted,
boolean isTypeParamsAccepted) |
static boolean |
isInheritor(PsiClass psiClass,
boolean strict,
java.lang.String baseClassName) |
static boolean |
isInheritor(PsiClass psiClass,
java.lang.String baseClassName) |
static boolean |
isInheritor(PsiType type,
java.lang.String baseClassName) |
static boolean |
isInheritorOrSelf(PsiClass aClass,
PsiClass baseClass,
boolean checkDeep) |
static boolean |
processSupers(PsiClass aClass,
boolean includeSelf,
Processor<? super PsiClass> superProcessor) |
static boolean |
processSuperTypes(PsiType type,
boolean includeSelf,
Processor<? super PsiType> processor) |
public static boolean isInheritorOrSelf(PsiClass aClass, PsiClass baseClass, boolean checkDeep)
aClass
- a class to check.baseClass
- supposed base class.checkDeep
- true to check deeper than aClass.super (see PsiClass.isInheritor(PsiClass, boolean)).public static boolean processSupers(PsiClass aClass, boolean includeSelf, Processor<? super PsiClass> superProcessor)
public static boolean isInheritor(PsiType type, java.lang.String baseClassName)
public static boolean isInheritor(PsiClass psiClass, java.lang.String baseClassName)
public static boolean isInheritor(PsiClass psiClass, boolean strict, java.lang.String baseClassName)
public static void getSuperClasses(PsiClass aClass, java.util.Set<? super PsiClass> results, boolean includeNonProject)
aClass
- results
- includeNonProject
- public static boolean hasEnclosingInstanceInScope(PsiClass aClass, PsiElement scope, boolean isSuperClassAccepted, boolean isTypeParamsAccepted)
public static boolean hasEnclosingInstanceInScope(PsiClass aClass, PsiElement scope, Condition<? super PsiClass> isSuperClassAccepted, boolean isTypeParamsAccepted)
public static PsiClass findEnclosingInstanceInScope(PsiClass aClass, PsiElement scope, Condition<? super PsiClass> isSuperClassAccepted, boolean isTypeParamsAccepted)
public static boolean processSuperTypes(PsiType type, boolean includeSelf, Processor<? super PsiType> processor)