public class ClassLoaderImpl extends Object implements IClassLoader
| Modifier and Type | Field and Description |
|---|---|
protected IClassHierarchy |
cha
Governing class hierarchy
|
static int |
DEBUG_LEVEL |
protected Map<TypeName,IClass> |
loadedClasses
A mapping from class name (TypeName) to IClass
|
| Constructor and Description |
|---|
ClassLoaderImpl(ClassLoaderReference loader,
ArrayClassLoader arrayClassLoader,
IClassLoader parent,
com.ibm.wala.util.config.SetOfClasses exclusions,
IClassHierarchy cha) |
| Modifier and Type | Method and Description |
|---|---|
SSAInstructionFactory |
getInstructionFactory() |
Language |
getLanguage() |
Atom |
getName() |
int |
getNumberOfClasses() |
int |
getNumberOfMethods() |
IClassLoader |
getParent()
Method getParent.
|
ClassLoaderReference |
getReference()
Return the ClassLoaderReference for this class loader.
|
Reader |
getSource(IClass klass) |
Reader |
getSource(IMethod method,
int offset) |
String |
getSourceFileName(IClass klass) |
String |
getSourceFileName(IMethod method,
int offset) |
void |
init(List<Module> modules)
Initialize internal data structures
|
Iterator<IClass> |
iterateAllClasses() |
protected void |
loadAllSources(Set<ModuleEntry> sourceModules)
Set up mapping from type name to Module Entry
|
IClass |
lookupClass(TypeName className)
Find and return the IClass defined by this class loader that corresponds to the given class name.
|
void |
removeAll(Collection<IClass> toRemove)
blow away references to any classes in the set
|
String |
toString() |
public static final int DEBUG_LEVEL
protected final Map<TypeName,IClass> loadedClasses
protected final IClassHierarchy cha
public ClassLoaderImpl(ClassLoaderReference loader, ArrayClassLoader arrayClassLoader, IClassLoader parent, com.ibm.wala.util.config.SetOfClasses exclusions, IClassHierarchy cha)
loader - class loader reference identifying this loaderparent - parent loader for delegationexclusions - set of classes to exclude from loadingprotected void loadAllSources(Set<ModuleEntry> sourceModules)
public void init(List<Module> modules) throws IOException
init in interface IClassLoaderIllegalArgumentException - if modules is nullIOExceptionpublic ClassLoaderReference getReference()
IClassLoadergetReference in interface IClassLoaderpublic Iterator<IClass> iterateAllClasses()
iterateAllClasses in interface IClassLoaderpublic IClass lookupClass(TypeName className)
IClassLoaderlookupClass in interface IClassLoaderclassName - name of the classpublic IClassLoader getParent()
getParent in interface IClassLoaderpublic Atom getName()
getName in interface IClassLoaderpublic Language getLanguage()
getLanguage in interface IClassLoaderpublic int getNumberOfClasses()
getNumberOfClasses in interface IClassLoaderpublic int getNumberOfMethods()
getNumberOfMethods in interface IClassLoaderpublic String getSourceFileName(IClass klass)
getSourceFileName in interface IClassLoaderklass - the class for which information is desired.public Reader getSource(IMethod method, int offset)
getSource in interface IClassLoadermethod - The method for which information is desiredoffset - an offset into the bytecode of the given method.public String getSourceFileName(IMethod method, int offset)
getSourceFileName in interface IClassLoadermethod - The method for which information is desiredoffset - an offset into the bytecode of the given method.public Reader getSource(IClass klass)
getSource in interface IClassLoaderpublic void removeAll(Collection<IClass> toRemove)
IClassLoaderremoveAll in interface IClassLoadertoRemove - Collectionpublic SSAInstructionFactory getInstructionFactory()
getInstructionFactory in interface IClassLoaderCopyright © 2015. All rights reserved.