junit.quilt.cover.generic
Class MethInstClassLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--java.net.URLClassLoader
                    |
                    +--junit.quilt.cover.generic.QuiltClassLoader
                          |
                          +--junit.quilt.cover.generic.MethInstClassLoader
Direct Known Subclasses:
B94ClassLoader, NoneClassLoader, SMClassLoader

public abstract class MethInstClassLoader
extends QuiltClassLoader


Constructor Summary
MethInstClassLoader(java.lang.String[] packages, java.net.URL[] path)
           
MethInstClassLoader(java.lang.String[] packages, java.net.URL[] path, java.lang.ClassLoader parent)
           
 
Method Summary
 EdgeFactory getEdgeFactory()
          getEdgeFactory() Override this method to provide your own edges.
 void instrumentEdge(InstContext context, ControlFlowGraph graph, FlowControlEdge edge, BlockVertex vertex)
          Call this to add a Vertex in place of an edge.
abstract  void instrumentMethod(InstContext context, ControlFlowGraph graph)
          Override this abstract method to instrument a method.
 void instrumentPool(InstContext context)
          instrumentPool Gives the subclass a chance to add things into the Constant Pool.
protected  org.apache.bcel.classfile.JavaClass modifyClass(org.apache.bcel.classfile.JavaClass jClass)
          modifyClass This is a generic version.
 
Methods inherited from class junit.quilt.cover.generic.QuiltClassLoader
addStaticField, findClass
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethInstClassLoader

public MethInstClassLoader(java.lang.String[] packages,
                           java.net.URL[] path)

MethInstClassLoader

public MethInstClassLoader(java.lang.String[] packages,
                           java.net.URL[] path,
                           java.lang.ClassLoader parent)
Method Detail

modifyClass

protected org.apache.bcel.classfile.JavaClass modifyClass(org.apache.bcel.classfile.JavaClass jClass)
modifyClass This is a generic version. It basically cleans some things in the class (i.e. make it public.) Pass each Method and a Graph representing the method to the super class.
Overrides:
modifyClass in class QuiltClassLoader

instrumentMethod

public abstract void instrumentMethod(InstContext context,
                                      ControlFlowGraph graph)
                               throws QuiltException
Override this abstract method to instrument a method.

instrumentEdge

public void instrumentEdge(InstContext context,
                           ControlFlowGraph graph,
                           FlowControlEdge edge,
                           BlockVertex vertex)
Call this to add a Vertex in place of an edge.

instrumentPool

public void instrumentPool(InstContext context)
instrumentPool Gives the subclass a chance to add things into the Constant Pool. If you need to pass information from here to the instrumentMethod make sure you drop it in the context.

getEdgeFactory

public EdgeFactory getEdgeFactory()
getEdgeFactory() Override this method to provide your own edges. . .


Copyright © 2001-2002 David Dixon-Peugh. All Rights Reserved.