|
Spring Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.ClassLoader
org.springframework.core.DecoratingClassLoader
org.springframework.core.OverridingClassLoader
org.springframework.instrument.classloading.SimpleInstrumentableClassLoader
public class SimpleInstrumentableClassLoader
Simplistic implementation of an instrumentable ClassLoader.
Usable in tests and standalone environments.
| Field Summary |
|---|
| Fields inherited from class org.springframework.core.OverridingClassLoader |
|---|
DEFAULT_EXCLUDED_PACKAGES |
| Constructor Summary | |
|---|---|
SimpleInstrumentableClassLoader(java.lang.ClassLoader parent)
Create a new SimpleLoadTimeWeaver for the given
ClassLoader. |
|
| Method Summary | |
|---|---|
void |
addTransformer(java.lang.instrument.ClassFileTransformer transformer)
Add a ClassFileTransformer to be applied by this
ClassLoader. |
protected byte[] |
transformIfNecessary(java.lang.String name,
byte[] bytes)
Transformation hook to be implemented by subclasses. |
| Methods inherited from class org.springframework.core.OverridingClassLoader |
|---|
isEligibleForOverriding, loadBytesForClass, loadClass, loadClassForOverriding, openStreamForClass |
| Methods inherited from class org.springframework.core.DecoratingClassLoader |
|---|
excludeClass, excludePackage, isExcluded |
| 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 |
| Constructor Detail |
|---|
public SimpleInstrumentableClassLoader(java.lang.ClassLoader parent)
SimpleLoadTimeWeaver for the given
ClassLoader.
parent - the ClassLoader to build a simple
instrumentable ClassLoader for| Method Detail |
|---|
public void addTransformer(java.lang.instrument.ClassFileTransformer transformer)
ClassFileTransformer to be applied by this
ClassLoader.
transformer - the ClassFileTransformer to register
protected byte[] transformIfNecessary(java.lang.String name,
byte[] bytes)
OverridingClassLoaderThe default implementation simply returns the given bytes as-is.
transformIfNecessary in class OverridingClassLoadername - the fully-qualified name of the class being transformedbytes - the raw bytes of the class
null;
same as the input bytes if the transformation produced no changes)
|
Spring Framework | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||