Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.codehaus.aspectwerkz.hook.impl
Class ClassPreProcessorHelper

    java.lang.Object
      org.codehaus.aspectwerkz.hook.impl.ClassPreProcessorHelper

    public class ClassPreProcessorHelper

extends 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).

Author:
  Alexandre Vasseur

Constructor Summary
`ClassPreProcessorHelper()`

Method Summary
`static byte[]` | `defineClass0Pre(ClassLoader caller, String name, byte[] b, int off, int len, ProtectionDomain pd)` byte code instrumentation of class loaded
`static Object` | `defineClass0Pre(ClassLoader caller, String name, Object byteBuffer, int off, int len, ProtectionDomain pd)` Byte code instrumentation of class loaded using Java 5 style thru NIO Since Java 5 comes with JVMTI this helper should be rarely used.
`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`

Constructor Detail

### ClassPreProcessorHelper

    public ClassPreProcessorHelper()

Method Detail

### 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(ClassLoader caller,
                                         String name,
                                         byte[] b,
                                         int off,
                                         int len,
                                         ProtectionDomain pd)

  byte code instrumentation of class loaded

### defineClass0Pre

    public static Object defineClass0Pre(ClassLoader caller,
                                         String name,
                                         Object byteBuffer,
                                         int off,
                                         int len,
                                         ProtectionDomain pd)

  Byte code instrumentation of class loaded using Java 5 style thru NIO Since Java 5 comes with JVMTI this helper should be rarely used. We do no reference ByteBuffer directly to allow Java 1.3 compilation, though this helper will be really slow

  Parameters:
    `caller` -
    `name` -
    `byteBuffer` - Object that is instance of Java 1.4 NIO ButeBuffer
    `off` -
    `len` -
    `pd` -
  Returns:
    Object instance of Java 1.4 NIO ByteBuffer

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2005 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.