|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader org.springframework.core.OverridingClassLoader org.springframework.instrument.classloading.SimpleInstrumentableClassLoader
public class SimpleInstrumentableClassLoader
Simplistic implementation of an instrumentable ClassLoader. Usable in tests and standalone environments.
Constructor Summary | |
---|---|
SimpleInstrumentableClassLoader(ClassLoader parent)
Create a new SimpleLoadTimeWeaver for the given class loader. |
Method Summary | |
---|---|
void |
addTransformer(ClassFileTransformer transformer)
Add a class file transformer to be applied by this ClassLoader. |
protected byte[] |
transformIfNecessary(String name,
byte[] bytes)
Transformation hook to be implemented by subclasses. |
Methods inherited from class org.springframework.core.OverridingClassLoader |
---|
excludeClass, excludePackage, isEligibleForOverriding, loadClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SimpleInstrumentableClassLoader(ClassLoader parent)
parent
- the ClassLoader to build an simple instrumentable
ClassLoader forMethod Detail |
---|
public void addTransformer(ClassFileTransformer transformer)
transformer
- the class file transformer to registerprotected byte[] transformIfNecessary(String name, byte[] bytes)
OverridingClassLoader
The default implementation simply returns the given bytes as-is.
transformIfNecessary
in class OverridingClassLoader
name
- 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)
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |