org.codehaus.aspectwerkz.joinpoint.management
Class JoinPointManager

java.lang.Object
  extended by org.codehaus.aspectwerkz.joinpoint.management.JoinPointManager

public class JoinPointManager
extends Object

Manages the join point compilation, loading and instantiation for the target classes. This implementation relies on the SystemDefinitionContainer.

Author:
Alexandre Vasseur , Jonas BonŽr , Alex Popescu

Nested Class Summary
static class JoinPointManager.CompiledJoinPoint
          A compiled joinpoint is tied to a compilation model at a given time
 
Constructor Summary
JoinPointManager()
           
 
Method Summary
static JoinPointManager.CompiledJoinPoint compileJoinPoint(int joinPointType, Class callerClass, String callerMethodName, String callerMethodDesc, int callerMethodModifiers, String calleeClassName, String calleeMemberName, String calleeMemberDesc, int calleeMemberModifiers, int joinPointHash, String joinPointClassName, Class calleeClass, ClassLoader loader)
          Compile a new joinpoint
static AdviceInfoContainer getAdviceInfoContainerForJoinPoint(ExpressionContext expressionContext, ClassLoader loader)
          Retrieves the advice info wrapped up in a struct.
static String[] getParameterNames(String adviceName)
          Get the parameter names from a "method declaration" signature like pc(type a, type2 b) => 0:a, 1:b
static void loadJoinPoint(int joinPointType, Class callerClass, String callerMethodName, String callerMethodDesc, int callerMethodModifiers, String calleeClassName, String calleeMemberName, String calleeMemberDesc, int calleeMemberModifiers, int joinPointHash, String joinPointClassName)
          Ensures that the specific joinPoint class for the given target class and joinPoint info is generated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JoinPointManager

public JoinPointManager()
Method Detail

loadJoinPoint

public static void loadJoinPoint(int joinPointType,
                                 Class callerClass,
                                 String callerMethodName,
                                 String callerMethodDesc,
                                 int callerMethodModifiers,
                                 String calleeClassName,
                                 String calleeMemberName,
                                 String calleeMemberDesc,
                                 int calleeMemberModifiers,
                                 int joinPointHash,
                                 String joinPointClassName)
Ensures that the specific joinPoint class for the given target class and joinPoint info is generated. This call is added to the weaved class as a "clinit" block

Parameters:
joinPointType -
callerClass -
callerMethodName -
callerMethodDesc -
callerMethodModifiers -
calleeClassName -
calleeMemberName -
calleeMemberDesc -
calleeMemberModifiers -
joinPointHash -
joinPointClassName -

compileJoinPoint

public static JoinPointManager.CompiledJoinPoint compileJoinPoint(int joinPointType,
                                                                  Class callerClass,
                                                                  String callerMethodName,
                                                                  String callerMethodDesc,
                                                                  int callerMethodModifiers,
                                                                  String calleeClassName,
                                                                  String calleeMemberName,
                                                                  String calleeMemberDesc,
                                                                  int calleeMemberModifiers,
                                                                  int joinPointHash,
                                                                  String joinPointClassName,
                                                                  Class calleeClass,
                                                                  ClassLoader loader)
Compile a new joinpoint

Parameters:
joinPointType -
callerClass -
callerMethodName -
callerMethodDesc -
callerMethodModifiers -
calleeClassName -
calleeMemberName -
calleeMemberDesc -
calleeMemberModifiers -
joinPointHash -
joinPointClassName -
calleeClass -
loader - the loader that hosts the definitions, and from where caller, callee and aspect are visible. At runtime it is exactly callerClass.getClassLoader() but in offline mode and genjp, it can happen to be different when weaved class also exists in the compilation classpath.
Returns:

getAdviceInfoContainerForJoinPoint

public static AdviceInfoContainer getAdviceInfoContainerForJoinPoint(ExpressionContext expressionContext,
                                                                     ClassLoader loader)
Retrieves the advice info wrapped up in a struct.

Parameters:
expressionContext -
loader -
Returns:
the advice info

getParameterNames

public static String[] getParameterNames(String adviceName)
Get the parameter names from a "method declaration" signature like pc(type a, type2 b) => 0:a, 1:b

Parameters:
adviceName -
Returns:
the parameter names


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