| java.lang.Object java.lang.ClassLoader soot.util.cfgcmd.AltClassLoader
AltClassLoader | public class AltClassLoader extends ClassLoader (Code) | | A
ClassLoader that loads specified classes from a
different class path than that given by the value of
java.class.path in
System.getProperties .
This class is part of Soot's test infrastructure. It allows
loading multiple implementations of a class with a given
name, and was written to compare different
implementations of Soot's CFG representations.
|
Constructor Summary | |
public | AltClassLoader(Singletons.Global g) Constructs an AltClassLoader for inclusion in Soot's
global variable manager,
G . |
Method Summary | |
protected Class | findClass(String maybeMangledName)
Loads a class from either the regular classpath, or the alternate
classpath, depending on whether it looks like we have already
mangled its name.
This method follows the steps provided by Ken
McCrary's ClasssLoader tutorial.
Parameters: maybeMangledName - A string from which the desired class'sname can be determined. | public Class | loadClass(String name) Loads a class, from the alternate classpath if the class's
name has been included in the list of alternate classes with
AltClassLoader.setAltClasses(String[]) setAltClasses() , from the
regular system classpath otherwise. | public static void | main(String[] argv) | public void | setAltClassPath(String altClassPath) Sets the list of locations in the alternate classpath. | public void | setAltClasses(String[] classNames) Specifies the set of class names that the AltClassLoader
should load from the alternate classpath instead of the
regular classpath. | public static AltClassLoader | v() Returns the single instance of AltClassLoader , which
loads classes from the classpath set by the most recent call to
its
AltClassLoader.setAltClassPath . |
AltClassLoader | public AltClassLoader(Singletons.Global g)(Code) | | Constructs an AltClassLoader for inclusion in Soot's
global variable manager,
G .
Parameters: g - guarantees that the constructor may only be called fromSingletons. |
findClass | protected Class findClass(String maybeMangledName) throws ClassNotFoundException(Code) | |
Loads a class from either the regular classpath, or the alternate
classpath, depending on whether it looks like we have already
mangled its name.
This method follows the steps provided by Ken
McCrary's ClasssLoader tutorial.
Parameters: maybeMangledName - A string from which the desired class'sname can be determined. It may have been mangled by AltClassLoader.loadClass(String) AltClassLoader.loadClass() sothat the regular ClassLoader to which we aredelegating won't load the class from the regular classpath. the loaded class. throws: ClassNotFoundException - if the class cannot be loaded. |
loadClass | public Class loadClass(String name) throws ClassNotFoundException(Code) | | Loads a class, from the alternate classpath if the class's
name has been included in the list of alternate classes with
AltClassLoader.setAltClasses(String[]) setAltClasses() , from the
regular system classpath otherwise. When a alternate class is
loaded, its references to other alternate classes are also
resolved to the alternate classpath.
Parameters: name - the name of the class to load. the loaded class. throws: ClassNotFoundException - if the class cannot be loaded. |
setAltClassPath | public void setAltClassPath(String altClassPath)(Code) | | Sets the list of locations in the alternate classpath.
Parameters: classPath - A list of directories and jar files tosearch for class files, delimited by File.pathSeparator. |
setAltClasses | public void setAltClasses(String[] classNames)(Code) | | Specifies the set of class names that the AltClassLoader
should load from the alternate classpath instead of the
regular classpath.
classNames[] an array containing the names of classes tobe loaded from the AltClassLoader. |
Methods inherited from java.lang.ClassLoader | public synchronized void clearAssertionStatus()(Code)(Java Doc) final protected Class> defineClass(byte[] b, int off, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] b, int off, int len) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, byte[] b, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc) final protected Class> defineClass(String name, java.nio.ByteBuffer b, ProtectionDomain protectionDomain) throws ClassFormatError(Code)(Java Doc) protected Package definePackage(String name, String specTitle, String specVersion, String specVendor, String implTitle, String implVersion, String implVendor, URL sealBase) throws IllegalArgumentException(Code)(Java Doc) protected Class> findClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected String findLibrary(String libname)(Code)(Java Doc) final protected Class> findLoadedClass(String name)(Code)(Java Doc) protected URL findResource(String name)(Code)(Java Doc) protected Enumeration<URL> findResources(String name) throws IOException(Code)(Java Doc) final protected Class> findSystemClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected Package getPackage(String name)(Code)(Java Doc) protected Package[] getPackages()(Code)(Java Doc) final public ClassLoader getParent()(Code)(Java Doc) public URL getResource(String name)(Code)(Java Doc) public InputStream getResourceAsStream(String name)(Code)(Java Doc) public Enumeration<URL> getResources(String name) throws IOException(Code)(Java Doc) public static ClassLoader getSystemClassLoader()(Code)(Java Doc) public static URL getSystemResource(String name)(Code)(Java Doc) public static InputStream getSystemResourceAsStream(String name)(Code)(Java Doc) public static Enumeration<URL> getSystemResources(String name) throws IOException(Code)(Java Doc) public Class> loadClass(String name) throws ClassNotFoundException(Code)(Java Doc) protected synchronized Class> loadClass(String name, boolean resolve) throws ClassNotFoundException(Code)(Java Doc) final protected void resolveClass(Class> c)(Code)(Java Doc) public synchronized void setClassAssertionStatus(String className, boolean enabled)(Code)(Java Doc) public synchronized void setDefaultAssertionStatus(boolean enabled)(Code)(Java Doc) public synchronized void setPackageAssertionStatus(String packageName, boolean enabled)(Code)(Java Doc) final protected void setSigners(Class> c, Object[] signers)(Code)(Java Doc)
|
|
|