org.jboss.aop.instrument
Class JoinPointGenerator

java.lang.Object
  extended by org.jboss.aop.instrument.JoinPointGenerator
Direct Known Subclasses:
ConByConJoinPointGenerator, ConByMethodJoinPointGenerator, ConstructionJoinPointGenerator, ConstructorJoinPointGenerator, FieldJoinPointGenerator, MethodByConJoinPointGenerator, MethodByMethodJoinPointGenerator, MethodJoinPointGenerator

public abstract class JoinPointGenerator
extends Object

Creates the Joinpoint invocation replacement classes used with Generated advisors

Version:
$Revision$
Author:
Kabir Khan

Nested Class Summary
protected  class JoinPointGenerator.AdviceSetup
           
protected static class JoinPointGenerator.JoinPointParameters
           
 
Field Summary
protected static String ARGUMENTS
           
protected static String CALLER_FIELD
           
static String DISPATCH
           
protected static javassist.CtClass[] EMPTY_CTCLASS_ARRAY
           
static String GENERATE_JOINPOINT_CLASS
           
protected static String GENERATED_CLASS_ADVISOR
           
static String INFO_FIELD
           
static String INVOKE_JOINPOINT
           
static String INVOKE_TARGET
           
static String JOINPOINT_CLASS_PREFIX
           
static String JOINPOINT_FIELD_PREFIX
           
protected  String joinpointClassName
           
protected  String joinpointFieldName
           
protected static String TARGET_FIELD
           
 
Constructor Summary
protected JoinPointGenerator(GeneratedClassAdvisor advisor, JoinPointInfo info, JoinPointGenerator.JoinPointParameters parameters, int argumentsSize)
           
 
Method Summary
protected static void addUntransformableInterface(javassist.ClassPool pool, javassist.CtClass clazz)
           
protected static void addUntransformableInterface(Instrumentor instrumentor, javassist.CtClass clazz)
           
 void generateJoinPointClass()
          Called by the joinpoint if a interceptors were regenereated Here for backwards compatiblity with AOP 1.5.0
 void generateJoinPointClass(ClassLoader classloader, JoinPointInfo info)
          Called by the joinpoint if a interceptors were regenereated
protected abstract  AdviceMethodProperties getAdviceMethodProperties(JoinPointInfo info, JoinPointGenerator.AdviceSetup setup)
           
protected static String getMethodString(javassist.CtClass joinpoint, String method, javassist.CtClass[] params)
           
protected abstract  Class getReturnType()
           
protected  boolean hasCallingObject()
           
protected abstract  boolean hasTargetObject()
           
protected abstract  void initialiseJoinPointNames(JoinPointInfo info)
           
protected  boolean isCaller()
           
protected abstract  boolean isVoid()
           
protected  void overrideDispatchMethods(javassist.CtClass superClass, javassist.CtClass clazz, CallerConstructorInfo cinfo)
          For ConByXXXX, If target constructor is execution advised, replace it with a call to the constructor wrapper
protected  void overrideDispatchMethods(javassist.CtClass superClass, javassist.CtClass clazz, JoinPointInfo newInfo)
          Normal people don't want to override the dispatch method
 void rebindJoinpoint(JoinPointInfo newInfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFO_FIELD

public static final String INFO_FIELD
See Also:
Constant Field Values

INVOKE_JOINPOINT

public static final String INVOKE_JOINPOINT
See Also:
Constant Field Values

INVOKE_TARGET

public static final String INVOKE_TARGET
See Also:
Constant Field Values

DISPATCH

public static final String DISPATCH
See Also:
Constant Field Values

TARGET_FIELD

protected static final String TARGET_FIELD
See Also:
Constant Field Values

CALLER_FIELD

protected static final String CALLER_FIELD
See Also:
Constant Field Values

GENERATED_CLASS_ADVISOR

protected static final String GENERATED_CLASS_ADVISOR

GENERATE_JOINPOINT_CLASS

public static final String GENERATE_JOINPOINT_CLASS
See Also:
Constant Field Values

JOINPOINT_FIELD_PREFIX

public static final String JOINPOINT_FIELD_PREFIX
See Also:
Constant Field Values

JOINPOINT_CLASS_PREFIX

public static final String JOINPOINT_CLASS_PREFIX
See Also:
Constant Field Values

ARGUMENTS

protected static final String ARGUMENTS
See Also:
Constant Field Values

EMPTY_CTCLASS_ARRAY

protected static final javassist.CtClass[] EMPTY_CTCLASS_ARRAY

joinpointClassName

protected String joinpointClassName

joinpointFieldName

protected String joinpointFieldName
Constructor Detail

JoinPointGenerator

protected JoinPointGenerator(GeneratedClassAdvisor advisor,
                             JoinPointInfo info,
                             JoinPointGenerator.JoinPointParameters parameters,
                             int argumentsSize)
Method Detail

rebindJoinpoint

public void rebindJoinpoint(JoinPointInfo newInfo)

generateJoinPointClass

public void generateJoinPointClass()
Called by the joinpoint if a interceptors were regenereated Here for backwards compatiblity with AOP 1.5.0


generateJoinPointClass

public void generateJoinPointClass(ClassLoader classloader,
                                   JoinPointInfo info)
Called by the joinpoint if a interceptors were regenereated


initialiseJoinPointNames

protected abstract void initialiseJoinPointNames(JoinPointInfo info)

isVoid

protected abstract boolean isVoid()

getReturnType

protected abstract Class getReturnType()

getAdviceMethodProperties

protected abstract AdviceMethodProperties getAdviceMethodProperties(JoinPointInfo info,
                                                                    JoinPointGenerator.AdviceSetup setup)

isCaller

protected boolean isCaller()

hasCallingObject

protected boolean hasCallingObject()

hasTargetObject

protected abstract boolean hasTargetObject()

overrideDispatchMethods

protected void overrideDispatchMethods(javassist.CtClass superClass,
                                       javassist.CtClass clazz,
                                       JoinPointInfo newInfo)
                                throws javassist.CannotCompileException,
                                       javassist.NotFoundException
Normal people don't want to override the dispatch method

Throws:
javassist.CannotCompileException
javassist.NotFoundException

overrideDispatchMethods

protected void overrideDispatchMethods(javassist.CtClass superClass,
                                       javassist.CtClass clazz,
                                       CallerConstructorInfo cinfo)
                                throws javassist.NotFoundException,
                                       javassist.CannotCompileException
For ConByXXXX, If target constructor is execution advised, replace it with a call to the constructor wrapper

Throws:
javassist.NotFoundException
javassist.CannotCompileException

addUntransformableInterface

protected static void addUntransformableInterface(Instrumentor instrumentor,
                                                  javassist.CtClass clazz)
                                           throws javassist.NotFoundException
Throws:
javassist.NotFoundException

addUntransformableInterface

protected static void addUntransformableInterface(javassist.ClassPool pool,
                                                  javassist.CtClass clazz)
                                           throws javassist.NotFoundException
Throws:
javassist.NotFoundException

getMethodString

protected static String getMethodString(javassist.CtClass joinpoint,
                                        String method,
                                        javassist.CtClass[] params)


Copyright © 2004 JBoss Inc. All Rights Reserved.