public interface IClassLoader
Modifier and Type | Method and Description |
---|---|
SSAInstructionFactory |
getInstructionFactory() |
Language |
getLanguage() |
Atom |
getName() |
int |
getNumberOfClasses() |
int |
getNumberOfMethods() |
IClassLoader |
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() |
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
|
IClass lookupClass(TypeName className)
className
- name of the classClassLoaderReference getReference()
Iterator<IClass> iterateAllClasses()
int getNumberOfClasses()
Atom getName()
Language getLanguage()
SSAInstructionFactory getInstructionFactory()
int getNumberOfMethods()
String getSourceFileName(IMethod method, int offset)
method
- The method for which information is desiredoffset
- an offset into the bytecode of the given method.Reader getSource(IMethod method, int offset)
method
- The method for which information is desiredoffset
- an offset into the bytecode of the given method.String getSourceFileName(IClass klass) throws NoSuchElementException
klass
- the class for which information is desired.NoSuchElementException
- if this class was generated from more than one source file
The assumption that a class is generated from a single source file is java
specific, and will change in the future. In place of this API, use the version that takes
a method and an offset, since that is now the granularity at which source file information
will be recorded.
SJF .. we should think about this deprecation. postponing deprecation for now.Reader getSource(IClass klass) throws NoSuchElementException
NoSuchElementException
- if this class was generated from more than one source file
The assumption that a class is generated from a single source file is java
specific, and will change in the future. In place of this API, use the version that takes
a method and an offset, since that is now the granularity at which source file information
will be recorded.
SJF .. we should think about this deprecation. postponing deprecation for now.IClassLoader getParent()
void init(List<Module> modules) throws IOException
IOException
IllegalArgumentException
- if modules is nullvoid removeAll(Collection<IClass> toRemove)
toRemove
- Collection