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
           
 
Field Summary
protected  GeneratedClassAdvisor advisor
           
static String DISPATCH
           
static String GENERATE_JOINPOINT_CLASS
           
protected static String GENERATED_CLASS_ADVISOR
           
static String GENERATOR_PREFIX
           
protected  JoinPointInfo info
           
static String INFO_FIELD
           
static String INVOKE_JOINPOINT
           
static String JOINPOINT_CLASS_PREFIX
           
static String JOINPOINT_FIELD_PREFIX
           
protected  String joinpointClassName
           
protected  String joinpointFieldName
           
protected static String TARGET_FIELD
           
 
Constructor Summary
JoinPointGenerator(GeneratedClassAdvisor advisor, JoinPointInfo info)
           
 
Method Summary
protected static void addUntransformableInterface(javassist.ClassPool pool, javassist.CtClass clazz)
           
protected static void addUntransformableInterface(Instrumentor instrumentor, javassist.CtClass clazz)
           
 void appendAroundCallString(StringBuffer invokeNextBody, String returnStr, JoinPointGenerator.AdviceSetup setup, AdviceMethodProperties properties)
           
 void generateJoinPointClass()
           
protected abstract  AdviceMethodProperties getAdviceMethodProperties(JoinPointGenerator.AdviceSetup setup)
           
protected abstract  String getJoinPointGeneratorFieldName()
           
protected abstract  Class getReturnType()
           
protected  boolean hasCallingObject()
           
protected abstract  boolean hasTargetObject()
           
protected abstract  void initialiseJoinPointNames()
           
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

DISPATCH

public static final String DISPATCH
See Also:
Constant Field Values

TARGET_FIELD

protected static final String TARGET_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

GENERATOR_PREFIX

public static final String GENERATOR_PREFIX
See Also:
Constant Field Values

info

protected JoinPointInfo info

advisor

protected GeneratedClassAdvisor advisor

joinpointClassName

protected String joinpointClassName

joinpointFieldName

protected String joinpointFieldName
Constructor Detail

JoinPointGenerator

public JoinPointGenerator(GeneratedClassAdvisor advisor,
                          JoinPointInfo info)
Method Detail

rebindJoinpoint

public void rebindJoinpoint(JoinPointInfo newInfo)

generateJoinPointClass

public void generateJoinPointClass()

initialiseJoinPointNames

protected abstract void initialiseJoinPointNames()

isVoid

protected abstract boolean isVoid()

getReturnType

protected abstract Class getReturnType()

getAdviceMethodProperties

protected abstract AdviceMethodProperties getAdviceMethodProperties(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

getJoinPointGeneratorFieldName

protected abstract String getJoinPointGeneratorFieldName()

appendAroundCallString

public void appendAroundCallString(StringBuffer invokeNextBody,
                                   String returnStr,
                                   JoinPointGenerator.AdviceSetup setup,
                                   AdviceMethodProperties properties)


Copyright © 2004 JBoss Inc. All Rights Reserved.