public interface JoinPoint
Provides 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()); } }
Modifier and Type | Interface and Description |
---|---|
static interface |
JoinPoint.EnclosingStaticPart |
static interface |
JoinPoint.StaticPart
This helper object contains only the static information about a join point.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADVICE_EXECUTION |
static java.lang.String |
CONSTRUCTOR_CALL |
static java.lang.String |
CONSTRUCTOR_EXECUTION |
static java.lang.String |
EXCEPTION_HANDLER |
static java.lang.String |
FIELD_GET |
static java.lang.String |
FIELD_SET |
static java.lang.String |
INITIALIZATION |
static java.lang.String |
METHOD_CALL |
static java.lang.String |
METHOD_EXECUTION
The legal return values from getKind()
|
static java.lang.String |
PREINITIALIZATION |
static java.lang.String |
STATICINITIALIZATION |
static java.lang.String |
SYNCHRONIZATION_LOCK |
static java.lang.String |
SYNCHRONIZATION_UNLOCK |
Modifier and Type | Method and Description |
---|---|
java.lang.Object[] |
getArgs() |
java.lang.String |
getKind()
This string is guaranteed to be interned.
|
Signature |
getSignature()
getStaticPart().getSignature() returns the same object |
SourceLocation |
getSourceLocation()
If there is no source location available, returns null.
|
JoinPoint.StaticPart |
getStaticPart() |
java.lang.Object |
getTarget()
Returns the target object.
|
java.lang.Object |
getThis()
Returns the currently executing object.
|
java.lang.String |
toLongString() |
java.lang.String |
toShortString() |
java.lang.String |
toString() |
static final java.lang.String METHOD_EXECUTION
static final java.lang.String METHOD_CALL
static final java.lang.String CONSTRUCTOR_EXECUTION
static final java.lang.String CONSTRUCTOR_CALL
static final java.lang.String FIELD_GET
static final java.lang.String FIELD_SET
static final java.lang.String STATICINITIALIZATION
static final java.lang.String PREINITIALIZATION
static final java.lang.String INITIALIZATION
static final java.lang.String EXCEPTION_HANDLER
static final java.lang.String SYNCHRONIZATION_LOCK
static final java.lang.String SYNCHRONIZATION_UNLOCK
static final java.lang.String ADVICE_EXECUTION
java.lang.String toString()
toString
in class java.lang.Object
java.lang.String toShortString()
java.lang.String toLongString()
java.lang.Object getThis()
Returns the currently executing object. This will always be
the same object as that matched by the this
pointcut
designator. Unless you specifically need this reflective access,
you should use the this
pointcut 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.
java.lang.Object getTarget()
target
pointcut
designator. Unless you specifically need this reflective access,
you should use the target
pointcut designator to
get at this object for better static typing and performance.
Returns null when there is no target objectjava.lang.Object[] getArgs()
Signature getSignature()
getStaticPart().getSignature()
returns the same objectSourceLocation getSourceLocation()
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.
java.lang.String getKind()
getStaticPart().getKind()
returns the same object.JoinPoint.StaticPart getStaticPart()