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.transform.inlining.compiler
Class JoinPointFactory

    java.lang.Object
      org.codehaus.aspectwerkz.transform.inlining.compiler.JoinPointFactory

    public class JoinPointFactory

extends Object

TODO is factory a good name, now that it does so much more?

Factory for the different join point implementations. Compiles a new join point on the fly and loads the class.

Author:
  Jonas Bonr

Constructor Summary
`JoinPointFactory()`

Method Summary
`static void` | `addCompilationInfo(Class clazz, CompilationInfo compilationInfo)` Adds or updates a compilation info.
`static Class` | `attachToClassLoader(String joinpointClassName, ClassLoader loader, byte[] bytecode)` Loads a join point class, one specific class for each distinct join point.
`static byte[]` | `compileJoinPoint(CompilationInfo.Model model)` Compiles a join point class, one specific class for each distinct join point.
`static Class` | `compileJoinPointAndAttachToClassLoader(CompilationInfo.Model model, ClassLoader loader)` Compiles and loades a join point class, one specific class for each distinct join point.
`static EmittedJoinPoint` | `getEmittedJoinPoint(Class clazz)` Returns the emitted join point structure for a specific JIT generated join point class.
`static Set` | `getJoinPointsMatching(ExpressionInfo expression)` Returns a list with all the join point compilers that matches a specific pointcut expression.
`static byte[]` | `redefineJoinPoint(CompilationInfo compilationInfo)` Redefines the originally compiled join point.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### JoinPointFactory

    public JoinPointFactory()

Method Detail

### compileJoinPointAndAttachToClassLoader

    public static Class compileJoinPointAndAttachToClassLoader(CompilationInfo.Model model,
                                                               ClassLoader loader)

  Compiles and loades a join point class, one specific class for each distinct join point.

  Parameters:
    `model` - the model for the compilation
    `loader` - the class loader that the compiled join point should live in
  Returns:
    the compiled join point class

### attachToClassLoader

    public static Class attachToClassLoader(String joinpointClassName,
                                            ClassLoader loader,
                                            byte[] bytecode)

  Loads a join point class, one specific class for each distinct join point.

  Parameters:
    `joinpointClassName` -
    `loader` - the class loader that the compiled join point should live in
    `bytecode` - of the joinpoint
  Returns:
    the compiled join point class

### addCompilationInfo

    public static void addCompilationInfo(Class clazz,
                                          CompilationInfo compilationInfo)

  Adds or updates a compilation info. The class key is always the first compiled join point class.

  Parameters:
    `clazz` -
    `compilationInfo` -

### compileJoinPoint

    public static byte[] compileJoinPoint(CompilationInfo.Model model)

  Compiles a join point class, one specific class for each distinct join point.

  Parameters:
    `model` - the model for the compilation
  Returns:
    the compiled join point bytecode

### redefineJoinPoint

    public static byte[] redefineJoinPoint(CompilationInfo compilationInfo)

  Redefines the originally compiled join point.

  Parameters:
    `compilationInfo` - the model for the compilation
  Returns:
    the compiled join point bytecode

### getJoinPointsMatching

    public static Set getJoinPointsMatching(ExpressionInfo expression)

  Returns a list with all the join point compilers that matches a specific pointcut expression.

  To be used for redefinition of the join point compilers only. This since the compilers must have been created in advance to exist in the repository (which is done when the target class is loaded).

  Parameters:
    `expression` - the pointcut expression
  Returns:
    a set with the matching emitted join point

### getEmittedJoinPoint

    public static EmittedJoinPoint getEmittedJoinPoint(Class clazz)

  Returns the emitted join point structure for a specific JIT generated join point class.

  Parameters:
    `clazz` - the join point class
  Returns:
    the emitted join point structure

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.