com.ibm.wala.classLoader
Interface IClassLoader

All Known Implementing Classes:
BypassSyntheticClassLoader, ClassLoaderImpl, JavaScriptLoader, JavaSourceLoaderImpl, PolyglotSourceLoaderImpl

public interface IClassLoader

Base class for an object that represents a single Java classloader for analysis purposes.


Method Summary
 Language getLanguage()
           
 Atom getName()
           
 int getNumberOfClasses()
           
 int getNumberOfMethods()
           
 IClassLoader getParent()
           
 ClassLoaderReference getReference()
          Return the ClassLoaderReference for this class loader.
 java.lang.String getSourceFileName(IClass klass)
           
 void init(java.util.Set modules)
           
 java.util.Iterator<IClass> iterateAllClasses()
           
 IClass lookupClass(TypeName className, IClassHierarchy cha)
          Find and return the IClass defined by this class loader that corresponds to the given class name.
 void removeAll(java.util.Collection<IClass> toRemove)
          blow away references to any classes in the set
 

Method Detail

lookupClass

IClass lookupClass(TypeName className,
                   IClassHierarchy cha)
Find and return the IClass defined by this class loader that corresponds to the given class name.

Parameters:
className - name of the class
Returns:
the IClass defined by this class loader that corresponds to the given class name, or null if not found.

getReference

ClassLoaderReference getReference()
Return the ClassLoaderReference for this class loader.

Returns:
ClassLoaderReference

iterateAllClasses

java.util.Iterator<IClass> iterateAllClasses()
Returns:
an Iterator of all classees loaded by this loader

getNumberOfClasses

int getNumberOfClasses()
Returns:
the number of classes in scope to be loaded by this loader

getName

Atom getName()
Returns:
the unique name that identifies this class loader.

getLanguage

Language getLanguage()
Returns:
the unique name that identifies the programming language from which this class loader loads code.

getNumberOfMethods

int getNumberOfMethods()

getSourceFileName

java.lang.String getSourceFileName(IClass klass)
Parameters:
klass -
Returns:
name of source file corresponding to the class

getParent

IClassLoader getParent()
Returns:
the parent IClassLoader, if any, or null

init

void init(java.util.Set modules)
          throws java.io.IOException
Throws:
java.io.IOException

removeAll

void removeAll(java.util.Collection<IClass> toRemove)
blow away references to any classes in the set

Parameters:
toRemove - Collection