Class JBossLoadTimeWeaver
java.lang.Object
org.springframework.instrument.classloading.jboss.JBossLoadTimeWeaver
- All Implemented Interfaces:
 LoadTimeWeaver
LoadTimeWeaver implementation for JBoss's instrumentable ClassLoader.
 Thanks to Ales Justin and Marius Bogoevici for the initial prototype.
 As of Spring Framework 5.0, this weaver supports WildFly 8+. As of Spring Framework 5.1.5, it also supports WildFly 13+.
- Since:
 - 3.0
 - Author:
 - Costin Leau, Juergen Hoeller
 
- 
Constructor Summary
ConstructorsConstructorDescriptionCreate a new instance of theJBossLoadTimeWeaverclass using the defaultclass loader.JBossLoadTimeWeaver(ClassLoader classLoader) Create a new instance of theJBossLoadTimeWeaverclass using the suppliedClassLoader. - 
Method Summary
Modifier and TypeMethodDescriptionvoidaddTransformer(ClassFileTransformer transformer) Add aClassFileTransformerto be applied by thisLoadTimeWeaver.Return aClassLoaderthat supports instrumentation through AspectJ-style load-time weaving based on user-definedClassFileTransformers.Return a throwawayClassLoader, enabling classes to be loaded and inspected without affecting the parentClassLoader. 
- 
Constructor Details
- 
JBossLoadTimeWeaver
public JBossLoadTimeWeaver()Create a new instance of theJBossLoadTimeWeaverclass using the defaultclass loader.- See Also:
 
 - 
JBossLoadTimeWeaver
Create a new instance of theJBossLoadTimeWeaverclass using the suppliedClassLoader.- Parameters:
 classLoader- theClassLoaderto delegate to for weaving
 
 - 
 - 
Method Details
- 
addTransformer
Description copied from interface:LoadTimeWeaverAdd aClassFileTransformerto be applied by thisLoadTimeWeaver.- Specified by:
 addTransformerin interfaceLoadTimeWeaver- Parameters:
 transformer- theClassFileTransformerto add
 - 
getInstrumentableClassLoader
Description copied from interface:LoadTimeWeaverReturn aClassLoaderthat supports instrumentation through AspectJ-style load-time weaving based on user-definedClassFileTransformers.May be the current
ClassLoader, or aClassLoadercreated by thisLoadTimeWeaverinstance.- Specified by:
 getInstrumentableClassLoaderin interfaceLoadTimeWeaver- Returns:
 - the 
ClassLoaderwhich will expose instrumented classes according to the registered transformers 
 - 
getThrowawayClassLoader
Description copied from interface:LoadTimeWeaverReturn a throwawayClassLoader, enabling classes to be loaded and inspected without affecting the parentClassLoader.Should not return the same instance of the
ClassLoaderreturned from an invocation ofLoadTimeWeaver.getInstrumentableClassLoader().- Specified by:
 getThrowawayClassLoaderin interfaceLoadTimeWeaver- Returns:
 - a temporary throwaway 
ClassLoader; should return a new instance for each call, with no existing state 
 
 -