org.jboss.aop.instrument
Class JoinPointGenerator
java.lang.Object
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
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 |
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
JoinPointGenerator
public JoinPointGenerator(GeneratedClassAdvisor advisor,
JoinPointInfo info)
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.