org.broadleafcommerce.common.extensibility.jpa
Class BroadleafLoadTimeWeaver

java.lang.Object
  extended by org.broadleafcommerce.common.extensibility.jpa.BroadleafLoadTimeWeaver
All Implemented Interfaces:
org.springframework.instrument.classloading.LoadTimeWeaver

public class BroadleafLoadTimeWeaver
extends Object
implements org.springframework.instrument.classloading.LoadTimeWeaver

Based on org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver from Spring 3.0.5 by Rod Johnson and Juergen Hoeller

Author:
jfischer

Constructor Summary
BroadleafLoadTimeWeaver()
          Create a new InstrumentationLoadTimeWeaver for the default ClassLoader.
BroadleafLoadTimeWeaver(ClassLoader classLoader)
          Create a new InstrumentationLoadTimeWeaver for the given ClassLoader.
 
Method Summary
 void addTransformer(ClassFileTransformer transformer)
           
 ClassLoader getInstrumentableClassLoader()
          We have the ability to weave the current class loader when starting the JVM in this way, so the instrumentable class loader will always be the current loader.
protected static Instrumentation getInstrumentation()
          Obtain the Instrumentation instance for the current VM, if available.
 ClassLoader getThrowawayClassLoader()
          This implementation always returns a SimpleThrowawayClassLoader.
static boolean isInstrumentationAvailable()
          Check whether an Instrumentation instance is available for the current VM.
 void removeTransformers()
          Remove all registered transformers, in inverse order of registration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BroadleafLoadTimeWeaver

public BroadleafLoadTimeWeaver()
Create a new InstrumentationLoadTimeWeaver for the default ClassLoader.


BroadleafLoadTimeWeaver

public BroadleafLoadTimeWeaver(ClassLoader classLoader)
Create a new InstrumentationLoadTimeWeaver for the given ClassLoader.

Parameters:
classLoader - the ClassLoader that registered transformers are supposed to apply to
Method Detail

addTransformer

public void addTransformer(ClassFileTransformer transformer)
Specified by:
addTransformer in interface org.springframework.instrument.classloading.LoadTimeWeaver

getInstrumentableClassLoader

public ClassLoader getInstrumentableClassLoader()
We have the ability to weave the current class loader when starting the JVM in this way, so the instrumentable class loader will always be the current loader.

Specified by:
getInstrumentableClassLoader in interface org.springframework.instrument.classloading.LoadTimeWeaver

getThrowawayClassLoader

public ClassLoader getThrowawayClassLoader()
This implementation always returns a SimpleThrowawayClassLoader.

Specified by:
getThrowawayClassLoader in interface org.springframework.instrument.classloading.LoadTimeWeaver

removeTransformers

public void removeTransformers()
Remove all registered transformers, in inverse order of registration.


isInstrumentationAvailable

public static boolean isInstrumentationAvailable()
Check whether an Instrumentation instance is available for the current VM.

See Also:
getInstrumentation()

getInstrumentation

protected static Instrumentation getInstrumentation()
Obtain the Instrumentation instance for the current VM, if available.

Returns:
the Instrumentation instance, or null if none found
See Also:
isInstrumentationAvailable()


Copyright © 2012. All Rights Reserved.