public class

WebLogicLoadTimeWeaver

extends Object
implements LoadTimeWeaver
java.lang.Object
   ↳ org.springframework.instrument.classloading.weblogic.WebLogicLoadTimeWeaver

Class Overview

LoadTimeWeaver implementation for WebLogic's instrumentable ClassLoader.

NOTE: Requires BEA WebLogic version 10 or higher.

Summary

Public Constructors
WebLogicLoadTimeWeaver()
Creates a new instance of the WebLogicLoadTimeWeaver class using the default class loader.
WebLogicLoadTimeWeaver(ClassLoader classLoader)
Creates a new instance of the WebLogicLoadTimeWeaver class using the supplied ClassLoader.
Public Methods
void addTransformer(ClassFileTransformer transformer)
Add a ClassFileTransformer to be applied by this LoadTimeWeaver.
ClassLoader getInstrumentableClassLoader()
Return a ClassLoader that supports instrumentation through AspectJ-style load-time weaving based on user-defined ClassFileTransformers.
ClassLoader getThrowawayClassLoader()
Return a throwaway ClassLoader, enabling classes to be loaded and inspected without affecting the parent ClassLoader.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.instrument.classloading.LoadTimeWeaver

Public Constructors

public WebLogicLoadTimeWeaver ()

Creates a new instance of the WebLogicLoadTimeWeaver class using the default class loader.

public WebLogicLoadTimeWeaver (ClassLoader classLoader)

Creates a new instance of the WebLogicLoadTimeWeaver class using the supplied ClassLoader.

Parameters
classLoader the ClassLoader to delegate to for weaving (must not be null)

Public Methods

public void addTransformer (ClassFileTransformer transformer)

Add a ClassFileTransformer to be applied by this LoadTimeWeaver.

Parameters
transformer the ClassFileTransformer to add

public ClassLoader getInstrumentableClassLoader ()

Return a ClassLoader that supports instrumentation through AspectJ-style load-time weaving based on user-defined ClassFileTransformers.

May be the current ClassLoader, or a ClassLoader created by this LoadTimeWeaver instance.

Returns
  • the ClassLoader which will expose instrumented classes according to the registered transformers

public ClassLoader getThrowawayClassLoader ()

Return a throwaway ClassLoader, enabling classes to be loaded and inspected without affecting the parent ClassLoader.

Should not return the same instance of the ClassLoader returned from an invocation of getInstrumentableClassLoader().

Returns
  • a temporary throwaway ClassLoader; should return a new instance for each call, with no existing state