|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.ibm.wala.ipa.summaries.BypassSyntheticClassLoader
public class BypassSyntheticClassLoader
This class represents class loaders that introduce classes that do not exist in the actual application being analyzed. They may be abstract summaries of unanalyzed library code, wrappers that encode J2EE specialized behavior or other invented classes. The intention is that there be (at most) one such classloader in a given class hierarchy, and that it be referenced using the "Synthetic" classloader reference. Furthermore, it is required that this synthetic loader be a child loader of the Primordial, Extension and Application loaders. This special classloader has some interactions with the hierarchy for, while the classes it loads are normal-seeming IClass objects, unlike the other loaders, its set of classes is not fixed, causing special cases in code that caches hierarchy data. Also note that this causes the getNumberfClasses and iterateAllClasses methods to behave differently for those of other classloaders. Code that wants to introduce synthetic classes uses the registerClass method, giving it an Atom which is the class name, and an IClass which is the class to load. Since the synthetic loader musat be a child of the others, it would be very bad to use an existing name for a new synthetic class. Class lookup works just as for any other classloader.
| Constructor Summary | |
|---|---|
BypassSyntheticClassLoader(ClassLoaderReference me,
IClassLoader parent,
SetOfClasses exclusions,
IClassHierarchy cha,
WarningSet warnings)
|
|
| 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 |
registerClass(TypeName className,
IClass theClass)
Register the existence of a new synthetic class |
void |
removeAll(java.util.Collection<IClass> toRemove)
blow away references to any classes in the set |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BypassSyntheticClassLoader(ClassLoaderReference me,
IClassLoader parent,
SetOfClasses exclusions,
IClassHierarchy cha,
WarningSet warnings)
| Method Detail |
|---|
public IClass lookupClass(TypeName className,
IClassHierarchy cha)
IClassLoader
lookupClass in interface IClassLoaderclassName - name of the class
public void registerClass(TypeName className,
IClass theClass)
className - theClass - public ClassLoaderReference getReference()
getReference in interface IClassLoaderpublic java.util.Iterator<IClass> iterateAllClasses()
iterateAllClasses in interface IClassLoaderpublic int getNumberOfClasses()
getNumberOfClasses in interface IClassLoaderpublic Atom getName()
getName in interface IClassLoaderpublic Language getLanguage()
getLanguage in interface IClassLoaderpublic int getNumberOfMethods()
getNumberOfMethods in interface IClassLoaderpublic java.lang.String getSourceFileName(IClass klass)
getSourceFileName in interface IClassLoaderpublic IClassLoader getParent()
getParent in interface IClassLoaderIClassLoader.getParent()public void init(java.util.Set modules)
init in interface IClassLoaderpublic void removeAll(java.util.Collection<IClass> toRemove)
IClassLoader
removeAll in interface IClassLoadertoRemove - Collection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||