org.codehaus.aspectwerkz.joinpoint
Class CallerSideJoinPoint

java.lang.Object
  extended byorg.codehaus.aspectwerkz.joinpoint.CallerSideJoinPoint
All Implemented Interfaces:
JoinPoint, java.io.Serializable

public class CallerSideJoinPoint
extends java.lang.Object
implements JoinPoint

Matches well defined point of execution in the program where a method is invoked. Stores meta data from the join point. I.e. a reference to original object and method, name and type of the field etc. Handles the invocation of the advices added to the join point.

Author:
Jonas Bonér
See Also:
Serialized Form

Constructor Summary
CallerSideJoinPoint(java.lang.String uuid, java.lang.Class callerClass, java.lang.String callerMethodName, java.lang.String callerMethodSignature, java.lang.String calleeMethodName, java.lang.String calleeMethodSignature)
          Creates a new CallerSideJoinPoint object.
 
Method Summary
 java.lang.String getCalleeClassName()
          Returns the name of callee class.
 java.lang.String getCalleeMethodName()
          Returns the callee method name.
 java.lang.String[] getCalleeMethodParameterTypeNames()
          Returns the parameter type names for the callee method.
 java.lang.Class[] getCalleeMethodParameterTypes()
          Returns the parameter types for the callee method.
 java.lang.Class getCalleeMethodReturnType()
          Returns the return type for the callee method.
 java.lang.String getCalleeMethodReturnTypeName()
          Returns the return type name for the callee method.
 java.lang.String getCalleeMethodSignature()
          Returns the callee method signature.
 java.lang.Class getCallerClass()
          Returns the caller class.
 java.lang.String getCallerClassName()
          Returns the name of caller class.
 java.lang.String getCallerMethodName()
          Returns the caller method name.
 java.lang.String[] getCallerMethodParameterTypeNames()
          Returns the parameter type names for the caller method.
 java.lang.Class[] getCallerMethodParameterTypes()
          Returns the parameter types for the method.
 java.lang.Class getCallerMethodReturnType()
          Returns the return type for the caller method.
 java.lang.String getCallerMethodReturnTypeName()
          Returns the return type name for the caller method.
 java.lang.String getCallerMethodSignature()
          Returns the caller method signature.
 java.lang.Class getTargetClass()
          Returns the target class.
 java.lang.Object getTargetObject()
          Returns the target object.
 void post()
          Invokes the next post advice in the chain until it reaches the end.
 void pre()
          Invokes the next pre advice in the chain until it reaches the end.
 java.lang.Object proceed()
          Invokes the next advice in the chain and when it reaches the end of the chain the original method.
 java.lang.Object proceedInNewThread()
          To be called instead of proceed() when a new thread is spawned.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallerSideJoinPoint

public CallerSideJoinPoint(java.lang.String uuid,
                           java.lang.Class callerClass,
                           java.lang.String callerMethodName,
                           java.lang.String callerMethodSignature,
                           java.lang.String calleeMethodName,
                           java.lang.String calleeMethodSignature)
Creates a new CallerSideJoinPoint object.

Parameters:
uuid - the UUID for the AspectWerkz system to use
callerClass - the caller class
callerMethodName - the full caller method name (including the class name)
callerMethodSignature - the caller method signature
calleeMethodName - the full callee method name (including the class name)
calleeMethodSignature - the callee method signature
Method Detail

proceedInNewThread

public java.lang.Object proceedInNewThread()
                                    throws java.lang.Throwable
To be called instead of proceed() when a new thread is spawned. Otherwise the result is unpredicable.

Specified by:
proceedInNewThread in interface JoinPoint
Returns:
the result from the next invocation
Throws:
java.lang.Throwable

proceed

public java.lang.Object proceed()
                         throws java.lang.Throwable
Invokes the next advice in the chain and when it reaches the end of the chain the original method.

Specified by:
proceed in interface JoinPoint
Returns:
the result from the next invocation
Throws:
java.lang.Throwable

pre

public void pre()
         throws java.lang.Throwable
Invokes the next pre advice in the chain until it reaches the end.

Throws:
java.lang.Throwable

post

public void post()
          throws java.lang.Throwable
Invokes the next post advice in the chain until it reaches the end.

Throws:
java.lang.Throwable

getTargetObject

public java.lang.Object getTargetObject()
Returns the target object.

Specified by:
getTargetObject in interface JoinPoint
Returns:
the target object

getTargetClass

public java.lang.Class getTargetClass()
Returns the target class. Same as getCallerClass().

Specified by:
getTargetClass in interface JoinPoint
Returns:
the target class

getCalleeMethodName

public java.lang.String getCalleeMethodName()
Returns the callee method name.

Returns:
the callee method name

getCalleeClassName

public java.lang.String getCalleeClassName()
Returns the name of callee class.

Returns:
the callee class name

getCalleeMethodParameterTypes

public java.lang.Class[] getCalleeMethodParameterTypes()
Returns the parameter types for the callee method.

Returns:
the parameter types

getCalleeMethodParameterTypeNames

public java.lang.String[] getCalleeMethodParameterTypeNames()
Returns the parameter type names for the callee method.

Returns:
the parameter type names

getCalleeMethodReturnType

public java.lang.Class getCalleeMethodReturnType()
Returns the return type for the callee method.

Returns:
the return type

getCalleeMethodReturnTypeName

public java.lang.String getCalleeMethodReturnTypeName()
Returns the return type name for the callee method.

Returns:
the return type name

getCalleeMethodSignature

public java.lang.String getCalleeMethodSignature()
Returns the callee method signature.

Returns:
the callee method signature

getCallerMethodName

public java.lang.String getCallerMethodName()
Returns the caller method name.

Returns:
the caller method name

getCallerClassName

public java.lang.String getCallerClassName()
Returns the name of caller class.

Returns:
the caller class name

getCallerClass

public java.lang.Class getCallerClass()
Returns the caller class. Same as getTargetClass().

Returns:
the caller class

getCallerMethodParameterTypes

public java.lang.Class[] getCallerMethodParameterTypes()
Returns the parameter types for the method.

Returns:
the parameter types

getCallerMethodParameterTypeNames

public java.lang.String[] getCallerMethodParameterTypeNames()
Returns the parameter type names for the caller method.

Returns:
the parameter type names

getCallerMethodReturnType

public java.lang.Class getCallerMethodReturnType()
Returns the return type for the caller method.

Returns:
the return type

getCallerMethodReturnTypeName

public java.lang.String getCallerMethodReturnTypeName()
Returns the return type name for the caller method.

Returns:
the return type name

getCallerMethodSignature

public java.lang.String getCallerMethodSignature()
Returns the caller method signature.

Returns:
the caller method signature


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.