|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.aspectwerkz.joinpoint.management.JoinPointBase
Base class for the join point implementations.
Field Summary | |
protected AfterAdviceExecutor |
m_afterAdviceExecutor
|
protected AroundAdviceExecutor |
m_aroundAdviceExecutor
|
protected BeforeAdviceExecutor |
m_beforeAdviceExecutor
|
protected boolean |
m_checkCflow
|
protected JoinPointMetaData |
m_joinPointMetaData
|
protected Map |
m_metaData
|
protected PointcutType |
m_pointcutType
|
protected AspectSystem |
m_system
|
protected Class |
m_targetClass
|
protected int |
m_type
|
protected String |
m_typeAsString
|
Fields inherited from interface org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint |
CONSTRUCTOR_CALL, CONSTRUCTOR_EXECUTION, FIELD_GET, FIELD_SET, HANDLER, METHOD_CALL, METHOD_EXECUTION, STATIC_INITIALIZATION |
Constructor Summary | |
JoinPointBase(int type,
Class targetClass,
JoinPointMetaData joinPointMetaData,
AroundAdviceExecutor aroundAdviceExecutor,
BeforeAdviceExecutor beforeAdviceExecutor,
AfterAdviceExecutor afterAdviceExecutor)
Creates a new join point base instance. |
|
JoinPointBase(String uuid,
int type,
Class targetClass,
JoinPointMetaData joinPointMetaData,
AroundAdviceExecutor aroundAdviceExecutor,
BeforeAdviceExecutor beforeAdviceExecutor,
AfterAdviceExecutor afterAdviceExecutor)
Creates a new join point base instance. |
|
JoinPointBase(String uuid,
int type,
Class targetClass,
List cflow,
ExpressionContext ctx,
AroundAdviceExecutor aroundAdviceExecutor,
BeforeAdviceExecutor beforeAdviceExecutor,
AfterAdviceExecutor afterAdviceExecutor)
Creates a new join point base instance. |
Method Summary | |
void |
addMetaData(Object key,
Object value)
Adds metadata. |
StaticJoinPoint |
deepCopy()
Clones the join point instance. |
abstract Object[] |
extractArguments(int[] methodToArgIndexes)
Extracts a subset of the joinPoint instance RTTI arguments. |
Object |
getCallee()
Returns the callee instance. |
Object |
getCaller()
Returns the caller instance. |
Class |
getCallerClass()
Returns the caller class. |
static String |
getJoinPointTypeAsString(int type)
Sets the join point type to a string representation. |
Object |
getMetaData(Object key)
Returns metadata matching a specfic key. |
static PointcutType |
getPointcutType(int type)
Sets the join point type to a string representation. |
Object |
getTarget()
Returns the target instance ('this'). |
Class |
getTargetClass()
Returns the target class. |
static Object |
getTargetField(JoinPoint joinPoint)
Gets the target field. |
Object |
getThis()
Returns the 'this' instance (the one currently executing). |
String |
getType()
Returns the join point type. |
static Object |
invokeJoinPoint(JoinPoint joinPoint,
int joinPointType)
Invoke the join point. |
static Object |
invokeTargetConstructorCall(JoinPoint joinPoint)
Invokes the original constructor. |
static Object |
invokeTargetConstructorExecution(JoinPoint joinPoint)
Invokes the prefixed constructor. |
static Object |
invokeTargetMethodCall(JoinPoint joinPoint)
Invokes the original method - call context. |
static Object |
invokeTargetMethodExecution(JoinPoint joinPoint)
Invokes the original method - execution context. |
boolean |
isInCflow()
Checks if the join point is in the correct control flow. |
void |
reset()
Resets the join point. |
protected abstract void |
setRtti(Rtti rtti)
Allows to pass the RTTI to the JP. |
static void |
setTargetField(JoinPoint joinPoint)
Sets the target field. |
String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.codehaus.aspectwerkz.joinpoint.JoinPoint |
getRtti |
Methods inherited from interface org.codehaus.aspectwerkz.joinpoint.StaticJoinPoint |
getSignature, proceed |
Field Detail |
protected Class m_targetClass
protected int m_type
protected String m_typeAsString
protected transient AspectSystem m_system
protected boolean m_checkCflow
protected AroundAdviceExecutor m_aroundAdviceExecutor
protected BeforeAdviceExecutor m_beforeAdviceExecutor
protected AfterAdviceExecutor m_afterAdviceExecutor
protected Map m_metaData
protected PointcutType m_pointcutType
protected transient JoinPointMetaData m_joinPointMetaData
Constructor Detail |
public JoinPointBase(int type, Class targetClass, JoinPointMetaData joinPointMetaData, AroundAdviceExecutor aroundAdviceExecutor, BeforeAdviceExecutor beforeAdviceExecutor, AfterAdviceExecutor afterAdviceExecutor)
type
- targetClass
- joinPointMetaData
- aroundAdviceExecutor
- beforeAdviceExecutor
- afterAdviceExecutor
- public JoinPointBase(String uuid, int type, Class targetClass, JoinPointMetaData joinPointMetaData, AroundAdviceExecutor aroundAdviceExecutor, BeforeAdviceExecutor beforeAdviceExecutor, AfterAdviceExecutor afterAdviceExecutor)
uuid
- type
- targetClass
- joinPointMetaData
- aroundAdviceExecutor
- beforeAdviceExecutor
- afterAdviceExecutor
- public JoinPointBase(String uuid, int type, Class targetClass, List cflow, ExpressionContext ctx, AroundAdviceExecutor aroundAdviceExecutor, BeforeAdviceExecutor beforeAdviceExecutor, AfterAdviceExecutor afterAdviceExecutor)
uuid
- type
- targetClass
- cflow
- ctx
- aroundAdviceExecutor
- beforeAdviceExecutor
- afterAdviceExecutor
- Method Detail |
public StaticJoinPoint deepCopy()
deepCopy
in interface StaticJoinPoint
public void reset()
reset
in interface JoinPoint
public Object getMetaData(Object key)
getMetaData
in interface StaticJoinPoint
key
- the key to the metadata
public void addMetaData(Object key, Object value)
addMetaData
in interface StaticJoinPoint
key
- the key to the metadatavalue
- the valuepublic Object getCallee()
getCallee
in interface StaticJoinPoint
public Object getCaller()
getCaller
in interface StaticJoinPoint
public Object getThis()
getThis
in interface StaticJoinPoint
public Class getCallerClass()
getCallerClass
in interface StaticJoinPoint
public static Object invokeTargetMethodExecution(JoinPoint joinPoint) throws Throwable
joinPoint
- the join point instance
Throwable
- the exception from the original methodpublic static Object invokeTargetMethodCall(JoinPoint joinPoint) throws Throwable
joinPoint
- the join point instance
Throwable
- the exception from the original methodpublic static Object invokeTargetConstructorExecution(JoinPoint joinPoint) throws Throwable
joinPoint
- the join point instance
Throwable
- the exception from the original constructorpublic static Object invokeTargetConstructorCall(JoinPoint joinPoint) throws Throwable
joinPoint
- the join point instance
Throwable
- the exception from the original constructor TODO: FIX BUG - When a constructor has both a CALL
and EXECUTION join point, only the CALL will be executed, redirecting to the wrapper
constructorpublic static void setTargetField(JoinPoint joinPoint) throws Throwable
joinPoint
- the join point instance
Throwable
- the exception from the original methodpublic static Object getTargetField(JoinPoint joinPoint) throws Throwable
joinPoint
- the join point instance
Throwable
- the exception from the original methodpublic static String getJoinPointTypeAsString(int type)
type
- the typepublic static PointcutType getPointcutType(int type)
type
- the typepublic static Object invokeJoinPoint(JoinPoint joinPoint, int joinPointType) throws Throwable
joinPoint
- the join point instance
Throwable
public Object getTarget()
getTarget
in interface StaticJoinPoint
public Class getTargetClass()
getTargetClass
in interface StaticJoinPoint
public String getType()
getType
in interface StaticJoinPoint
public boolean isInCflow()
public String toString()
public abstract Object[] extractArguments(int[] methodToArgIndexes)
methodToArgIndexes
-
protected abstract void setRtti(Rtti rtti)
rtti
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |