Interface JoinPoint
-
- All Known Subinterfaces:
ProceedingJoinPoint
public interface JoinPointProvides reflective access to both the state available at a join point and static information about it. This information is available from the body of advice using the special form
thisJoinPoint. The primary use of this reflective information is for tracing and logging applications.aspect Logging { before(): within(com.bigboxco..*) && execution(public * *(..)) { System.err.println("entering: " + thisJoinPoint); System.err.println(" w/args: " + thisJoinPoint.getArgs()); System.err.println(" at: " + thisJoinPoint.getSourceLocation()); } }
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceJoinPoint.EnclosingStaticPartstatic interfaceJoinPoint.StaticPartThis helper object contains only the static information about a join point.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringADVICE_EXECUTIONstatic java.lang.StringCONSTRUCTOR_CALLstatic java.lang.StringCONSTRUCTOR_EXECUTIONstatic java.lang.StringEXCEPTION_HANDLERstatic java.lang.StringFIELD_GETstatic java.lang.StringFIELD_SETstatic java.lang.StringINITIALIZATIONstatic java.lang.StringMETHOD_CALLstatic java.lang.StringMETHOD_EXECUTIONThe legal return values from getKind()static java.lang.StringPREINITIALIZATIONstatic java.lang.StringSTATICINITIALIZATIONstatic java.lang.StringSYNCHRONIZATION_LOCKstatic java.lang.StringSYNCHRONIZATION_UNLOCK
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object[]getArgs()Returns the arguments at this join point.java.lang.StringgetKind()Returns a String representing the kind of join point.SignaturegetSignature()Returns the signature at the join point.SourceLocationgetSourceLocation()Returns the source location corresponding to the join point.JoinPoint.StaticPartgetStaticPart()Returns an object that encapsulates the static parts of this join point.java.lang.ObjectgetTarget()Returns the target object.java.lang.ObjectgetThis()Returns the currently executing object.java.lang.StringtoLongString()Returns an extended string representation of the join point.java.lang.StringtoShortString()Returns an abbreviated string representation of the join point.java.lang.StringtoString()
-
-
-
Field Detail
-
METHOD_EXECUTION
static final java.lang.String METHOD_EXECUTION
The legal return values from getKind()- See Also:
- Constant Field Values
-
METHOD_CALL
static final java.lang.String METHOD_CALL
- See Also:
- Constant Field Values
-
CONSTRUCTOR_EXECUTION
static final java.lang.String CONSTRUCTOR_EXECUTION
- See Also:
- Constant Field Values
-
CONSTRUCTOR_CALL
static final java.lang.String CONSTRUCTOR_CALL
- See Also:
- Constant Field Values
-
FIELD_GET
static final java.lang.String FIELD_GET
- See Also:
- Constant Field Values
-
FIELD_SET
static final java.lang.String FIELD_SET
- See Also:
- Constant Field Values
-
STATICINITIALIZATION
static final java.lang.String STATICINITIALIZATION
- See Also:
- Constant Field Values
-
PREINITIALIZATION
static final java.lang.String PREINITIALIZATION
- See Also:
- Constant Field Values
-
INITIALIZATION
static final java.lang.String INITIALIZATION
- See Also:
- Constant Field Values
-
EXCEPTION_HANDLER
static final java.lang.String EXCEPTION_HANDLER
- See Also:
- Constant Field Values
-
SYNCHRONIZATION_LOCK
static final java.lang.String SYNCHRONIZATION_LOCK
- See Also:
- Constant Field Values
-
SYNCHRONIZATION_UNLOCK
static final java.lang.String SYNCHRONIZATION_UNLOCK
- See Also:
- Constant Field Values
-
ADVICE_EXECUTION
static final java.lang.String ADVICE_EXECUTION
- See Also:
- Constant Field Values
-
-
Method Detail
-
toString
java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
toShortString
java.lang.String toShortString()
Returns an abbreviated string representation of the join point.
-
toLongString
java.lang.String toLongString()
Returns an extended string representation of the join point.
-
getThis
java.lang.Object getThis()
Returns the currently executing object. This will always be the same object as that matched by the
thispointcut designator. Unless you specifically need this reflective access, you should use thethispointcut designator to get at this object for better static typing and performance.Returns null when there is no currently executing object available. This includes all join points that occur in a static context.
-
getTarget
java.lang.Object getTarget()
Returns the target object. This will always be the same object as that matched by the
targetpointcut designator. Unless you specifically need this reflective access, you should use thetargetpointcut designator to get at this object for better static typing and performance.Returns null when there is no target object.
-
getArgs
java.lang.Object[] getArgs()
Returns the arguments at this join point.
-
getSignature
Signature getSignature()
Returns the signature at the join point.getStaticPart().getSignature()returns the same object
-
getSourceLocation
SourceLocation getSourceLocation()
Returns the source location corresponding to the join point.
If there is no source location available, returns null.
Returns the SourceLocation of the defining class for default constructors.
getStaticPart().getSourceLocation()returns the same object.
-
getKind
java.lang.String getKind()
Returns a String representing the kind of join point. This String is guaranteed to be interned.getStaticPart().getKind()returns the same object.
-
getStaticPart
JoinPoint.StaticPart getStaticPart()
Returns an object that encapsulates the static parts of this join point.
-
-