| java.lang.Object java.lang.ClassLoader com.reeltwo.jumble.mutation.MutatingClassLoader
MutatingClassLoader | public class MutatingClassLoader extends ClassLoader (Code) | | A ClassLoader which embeds a Mutater so
that applications can be run with a single class undergoing
mutation.
author: Tin Pavlinic version: $Revision: 516 $ |
Constructor Summary | |
public | MutatingClassLoader(String target, Mutater mutater, String classpath) Creates a new MutatingClassLoader instance.
Parameters: target - the class name to be mutated. |
MutatingClassLoader | public MutatingClassLoader(String target, Mutater mutater, String classpath)(Code) | | Creates a new MutatingClassLoader instance.
Parameters: target - the class name to be mutated. Other classes willnot be mutated. Parameters: mutater - a Mutater value that will carry outmutations. Parameters: classpath - a String value supplying theclasses visible to the classloader. |
getModification | public String getModification()(Code) | | Gets a string description of the modification produced.
the modification |
modifyClass | public JavaClass modifyClass(JavaClass clazz)(Code) | | If the class matches the target then it is mutated, otherwise the class if
returned unmodified. Overrides the corresponding method in the superclass.
Classes are cached so that we always load a fresh version.
This method is public so we can test it
Parameters: clazz - modification target possibly modified class |
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)
|
|
|