public interface IClassHierarchy extends Iterable<IClass>
| Modifier and Type | Method and Description |
|---|---|
boolean |
addClass(IClass klass) |
Collection<IClass> |
computeSubClasses(TypeReference type)
Return set of all subclasses of type in the Class Hierarchy
|
ClassLoaderFactory |
getFactory() |
Collection<IClass> |
getImmediateSubclasses(IClass klass) |
Set<IClass> |
getImplementors(TypeReference type) |
Collection<TypeReference> |
getJavaLangErrorTypes()
Solely for optimization; return a Collection
|
Collection<TypeReference> |
getJavaLangRuntimeExceptionTypes()
Solely for optimization; return a Collection
RuntimeException
kind of ugly. |
IClass |
getLeastCommonSuperclass(IClass A,
IClass B) |
TypeReference |
getLeastCommonSuperclass(TypeReference A,
TypeReference B) |
IClassLoader |
getLoader(ClassLoaderReference loaderRef) |
IClassLoader[] |
getLoaders() |
int |
getNumber(IClass c) |
int |
getNumberOfClasses() |
int |
getNumberOfImmediateSubclasses(IClass klass) |
Set<IMethod> |
getPossibleTargets(IClass receiverClass,
MethodReference ref)
Find the possible targets of a call to a method reference where the receiver is of a certain type
|
Set<IMethod> |
getPossibleTargets(MethodReference ref)
Find the possible targets of a call to a method reference
|
IClass |
getRootClass() |
AnalysisScope |
getScope() |
Set<TypeReference> |
getUnresolvedClasses()
BEGIN Custom change: remember unresolved classes
|
boolean |
implementsInterface(IClass c,
IClass i)
Does c implement i?
|
boolean |
isAssignableFrom(IClass c1,
IClass c2)
Does an expression c1 x := c2 y typecheck?
i.e.
|
boolean |
isInterface(TypeReference type) |
boolean |
isRootClass(IClass c) |
boolean |
isSubclassOf(IClass c,
IClass T)
Is c a subclass of T?
|
IClass |
lookupClass(TypeReference A)
Load a class using one of the loaders specified for this class hierarchy
|
IField |
resolveField(FieldReference f) |
IField |
resolveField(IClass klass,
FieldReference f) |
IMethod |
resolveMethod(IClass receiverClass,
Selector selector)
Return the unique receiver of an invocation of method on an object of type declaringClass
|
IMethod |
resolveMethod(MethodReference m)
Return the unique receiver of an invocation of method on an object of type m.getDeclaredClass
|
ClassLoaderFactory getFactory()
AnalysisScope getScope()
IClassLoader[] getLoaders()
IClassLoader getLoader(ClassLoaderReference loaderRef)
boolean addClass(IClass klass)
IllegalArgumentException - if klass is nullint getNumberOfClasses()
boolean isRootClass(IClass c)
IClass getRootClass()
int getNumber(IClass c)
Set<TypeReference> getUnresolvedClasses()
Set<IMethod> getPossibleTargets(MethodReference ref)
ref - method referenceIllegalArgumentException - if ref is nullSet<IMethod> getPossibleTargets(IClass receiverClass, MethodReference ref)
receiverClass - the class of the receiverref - method referenceIMethod resolveMethod(MethodReference m)
IllegalArgumentException - if m is nullIField resolveField(FieldReference f)
IllegalArgumentException - if f is nullIField resolveField(IClass klass, FieldReference f)
IllegalArgumentException - if f is nullIllegalArgumentException - if klass is nullIMethod resolveMethod(IClass receiverClass, Selector selector)
receiverClass - type of receiverselector - method signatureIllegalArgumentException - if receiverClass is nullIClass lookupClass(TypeReference A)
IllegalArgumentException - if A is nullboolean isInterface(TypeReference type)
TypeReference getLeastCommonSuperclass(TypeReference A, TypeReference B)
boolean isSubclassOf(IClass c, IClass T)
IllegalArgumentException - if c is nullboolean implementsInterface(IClass c, IClass i)
Collection<IClass> computeSubClasses(TypeReference type)
Collection<TypeReference> getJavaLangErrorTypes()
Collection<TypeReference> getJavaLangRuntimeExceptionTypes()
RuntimeException
kind of ugly. a better scheme?Set<IClass> getImplementors(TypeReference type)
type - an interfaceint getNumberOfImmediateSubclasses(IClass klass)
Collection<IClass> getImmediateSubclasses(IClass klass)
boolean isAssignableFrom(IClass c1, IClass c2)
IllegalArgumentException - if c1 is nullIllegalArgumentException - if c2 is nullCopyright © 2015. All rights reserved.