Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

edu.ucsb.ccs.jcontractor
Class jContractorClassLoader  view jContractorClassLoader download jContractorClassLoader.java

java.lang.Object
  extended byjava.lang.ClassLoader
      extended byedu.ucsb.ccs.jcontractor.jContractorClassLoader

public class jContractorClassLoader
extends java.lang.ClassLoader

A class loader than uses jInstrument to instrument classes are they are loaded. Unfortunatly, the Java libraries do not allow specialized class loaders to fool around with the java.* packages, so classes in these packages cannot be instrumented.

Version:
$Id: jContractorClassLoader.java,v 1.13 2002/05/22 06:28:45 parkera Exp $

Nested Class Summary
 
Nested classes inherited from class java.lang.ClassLoader
 
Field Summary
protected  java.util.Hashtable classes
          A hashtable to store classes that have already been instrumented.
static org.apache.bcel.util.ClassPath classpath
          Shared reference to the class path;
protected  jInstrument instrumentor
          An instance of jInstrument that will be used to instrument classes as they are loaded.
 
Fields inherited from class java.lang.ClassLoader
 
Constructor Summary
jContractorClassLoader()
          Create a new class loader with a default instance of jInstrument.
jContractorClassLoader(jInstrument instrumentor)
          Create a class loader using the specified jInstrument to instrument classes.
 
Method Summary
protected  boolean _Invariant()
           
protected  boolean loadClass_Precondition(java.lang.String name, boolean resolve)
           
protected  java.lang.Class loadClass(java.lang.String name, boolean resolve)
          Load a class and instrument it to enforce jContractor contracts.
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instrumentor

protected jInstrument instrumentor
An instance of jInstrument that will be used to instrument classes as they are loaded.


classes

protected java.util.Hashtable classes
A hashtable to store classes that have already been instrumented. The keys are the class names (String), and the values are the classes themselves (Class).


classpath

public static org.apache.bcel.util.ClassPath classpath
Shared reference to the class path;

Constructor Detail

jContractorClassLoader

public jContractorClassLoader()
Create a new class loader with a default instance of jInstrument. All classes will be instrumented to the fullest (pre, post, invariant).


jContractorClassLoader

public jContractorClassLoader(jInstrument instrumentor)
Create a class loader using the specified jInstrument to instrument classes.

Method Detail

loadClass

protected java.lang.Class loadClass(java.lang.String name,
                                    boolean resolve)
                             throws java.lang.ClassNotFoundException,
                                    java.lang.RuntimeException
Load a class and instrument it to enforce jContractor contracts. All classes are instrumented except for those in the java.lang package. The JVM forbids modification of these classes.


loadClass_Precondition

protected boolean loadClass_Precondition(java.lang.String name,
                                         boolean resolve)

_Invariant

protected boolean _Invariant()