public abstract class CAstAbstractLoader extends Object implements IClassLoader
Modifier and Type | Field and Description |
---|---|
protected IClassHierarchy |
cha |
protected IClassLoader |
parent |
protected Map<TypeName,IClass> |
types
types loaded by this
|
Constructor and Description |
---|
CAstAbstractLoader(IClassHierarchy cha) |
CAstAbstractLoader(IClassHierarchy cha,
IClassLoader parent) |
Modifier and Type | Method and Description |
---|---|
void |
addMessage(ModuleEntry module,
Set<Warning> message) |
void |
addMessage(ModuleEntry module,
Warning message) |
void |
clearMessages() |
Set<Warning> |
getMessages(ModuleEntry m) |
Iterator<ModuleEntry> |
getModulesWithParseErrors() |
Iterator<ModuleEntry> |
getModulesWithWarnings() |
Atom |
getName() |
int |
getNumberOfClasses() |
int |
getNumberOfMethods() |
IClassLoader |
getParent() |
Reader |
getSource(IClass klass) |
Reader |
getSource(IMethod method,
int bcOffset) |
String |
getSourceFileName(IClass klass) |
String |
getSourceFileName(IMethod method,
int bcOffset) |
Iterator<IClass> |
iterateAllClasses() |
IClass |
lookupClass(String className,
IClassHierarchy cha) |
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
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInstructionFactory, getLanguage, getReference, init
protected final IClassHierarchy cha
protected final IClassLoader parent
public CAstAbstractLoader(IClassHierarchy cha, IClassLoader parent)
public CAstAbstractLoader(IClassHierarchy cha)
public void addMessage(ModuleEntry module, Set<Warning> message)
public void addMessage(ModuleEntry module, Warning message)
public Iterator<ModuleEntry> getModulesWithParseErrors()
public Iterator<ModuleEntry> getModulesWithWarnings()
public Set<Warning> getMessages(ModuleEntry m)
public void clearMessages()
public IClass lookupClass(String className, IClassHierarchy cha)
public IClass lookupClass(TypeName className)
IClassLoader
lookupClass
in interface IClassLoader
className
- name of the classpublic Iterator<IClass> iterateAllClasses()
iterateAllClasses
in interface IClassLoader
public int getNumberOfClasses()
getNumberOfClasses
in interface IClassLoader
public Atom getName()
getName
in interface IClassLoader
public int getNumberOfMethods()
getNumberOfMethods
in interface IClassLoader
public String getSourceFileName(IMethod method, int bcOffset)
getSourceFileName
in interface IClassLoader
method
- The method for which information is desiredbcOffset
- an offset into the bytecode of the given method.public String getSourceFileName(IClass klass)
getSourceFileName
in interface IClassLoader
klass
- the class for which information is desired.public Reader getSource(IClass klass)
getSource
in interface IClassLoader
public Reader getSource(IMethod method, int bcOffset)
getSource
in interface IClassLoader
method
- The method for which information is desiredbcOffset
- an offset into the bytecode of the given method.public IClassLoader getParent()
getParent
in interface IClassLoader
public void removeAll(Collection<IClass> toRemove)
IClassLoader
removeAll
in interface IClassLoader
toRemove
- Collection