org.keel.core.classloader
Class ClassPreProcessorHelper
java.lang.Object
org.keel.core.classloader.ClassPreProcessorHelper
- public class ClassPreProcessorHelper
- extends java.lang.Object
Helper class called by the modified java.lang.ClassLoader.
This class is called at different points by the modified java.lang.ClassLoader of the org.codehaus.aspectwerkz.hook.impl.ClassLoaderPreProcessorImpl implemention.
This class must reside in the -Xbootclasspath when AspectWerkz layer 1 is used, but the effective implementation of the class preprocessor (AspectWerkz layer 2) can be in standard system classpath (-cp). Changed by Shash Chatterjee to allow use when AspectWerkz is loaded from the Keel server lib and the custom Keel classloader.
- Author:
- ,
| Method Summary |
static byte[] |
defineClass0Pre(java.lang.ClassLoader caller, java.lang.String name, byte[] b, int off, int len, java.security.ProtectionDomain pd)
byte code instrumentation of class loaded |
static ClassPreProcessor |
getClassPreProcessor()
Returns the configured class preprocessor Should be called after initialization only |
static void |
initializePreProcessor()
Initialization of the ClassPreProcessor The ClassPreProcessor implementation is lazy loaded. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
preProcessor
private static ClassPreProcessor preProcessor
-
ClassPreProcessor used if aspectwerkz.classloader.preprocessor property is defined to full qualified class name
preProcessorInitialized
private static boolean preProcessorInitialized
-
true if preProcesor already initalized
PRE_PROCESSOR_CLASSNAME_PROPERTY
private static java.lang.String PRE_PROCESSOR_CLASSNAME_PROPERTY
-
option used to defined the class preprocessor
PRE_PROCESSOR_CLASSNAME_DEFAULT
private static java.lang.String PRE_PROCESSOR_CLASSNAME_DEFAULT
-
default class preprocessor
ClassPreProcessorHelper
public ClassPreProcessorHelper()
getClassPreProcessor
public static ClassPreProcessor getClassPreProcessor()
-
Returns the configured class preprocessor Should be called after initialization only
-
- Returns:
- the preprocessor or null if not initialized
initializePreProcessor
public static void initializePreProcessor()
-
Initialization of the ClassPreProcessor The ClassPreProcessor implementation is lazy loaded. This allow to put it in the regular classpath whereas the instrumentation layer (layer 1) is in the bootclasspath
-
defineClass0Pre
public static byte[] defineClass0Pre(java.lang.ClassLoader caller,
java.lang.String name,
byte[] b,
int off,
int len,
java.security.ProtectionDomain pd)
-
byte code instrumentation of class loaded
-
Please see keelframework.org for information about new Keel releases.