org.springframework.instrument.classloading
Class SimpleInstrumentableClassLoader
java.lang.Object
   java.lang.ClassLoader
java.lang.ClassLoader
       org.springframework.core.DecoratingClassLoader
org.springframework.core.DecoratingClassLoader
           org.springframework.core.OverridingClassLoader
org.springframework.core.OverridingClassLoader
               org.springframework.instrument.classloading.SimpleInstrumentableClassLoader
org.springframework.instrument.classloading.SimpleInstrumentableClassLoader
- public class SimpleInstrumentableClassLoader 
- extends OverridingClassLoader
Simplistic implementation of an instrumentable ClassLoader.
 
Usable in tests and standalone environments.
- Since:
- 2.0
- Author:
- Rod Johnson, Costin Leau
 
 
 
 
 
 
| 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 | 
 
SimpleInstrumentableClassLoader
public SimpleInstrumentableClassLoader(ClassLoader parent)
- Create a new SimpleLoadTimeWeaverfor the givenClassLoader.
 
- Parameters:
- parent- the- ClassLoaderto build a simple
 instrumentable- ClassLoaderfor
 
addTransformer
public void addTransformer(ClassFileTransformer transformer)
- Add a ClassFileTransformerto be applied by thisClassLoader.
 
- 
- Parameters:
- transformer- the- ClassFileTransformerto register
 
transformIfNecessary
protected byte[] transformIfNecessary(String name,
                                      byte[] bytes)
- Description copied from class: OverridingClassLoader
- Transformation hook to be implemented by subclasses.
 The default implementation simply returns the given bytes as-is.
 
 
- 
- Overrides:
- transformIfNecessaryin class- OverridingClassLoader
 
- 
- Parameters:
- name- the fully-qualified name of the class being transformed
- bytes- the raw bytes of the class
- Returns:
- the transformed bytes (never null;
 same as the input bytes if the transformation produced no changes)
 
Copyright © 2002-2008 The Spring Framework.