Schnittstelle JoinPoint
- Alle bekannten Unterschnittstellen:
ProceedingJoinPoint
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()); } }
-
Verschachtelte Klassen - Übersicht
Modifizierer und TypSchnittstelleBeschreibungstatic interface
static interface
This helper object contains only the static information about a join point. -
Feldübersicht
Modifizierer und TypFeldBeschreibungstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
The legal return values from getKind()static final String
static final String
static final String
static final String
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungObject[]
getArgs()
getKind()
This string is guaranteed to be interned.getStaticPart().getSignature()
returns the same objectIf there is no source location available, returns null.Returns the target object.getThis()
Returns the currently executing object.toString()
-
Felddetails
-
METHOD_EXECUTION
The legal return values from getKind()- Siehe auch:
-
METHOD_CALL
- Siehe auch:
-
CONSTRUCTOR_EXECUTION
- Siehe auch:
-
CONSTRUCTOR_CALL
- Siehe auch:
-
FIELD_GET
- Siehe auch:
-
FIELD_SET
- Siehe auch:
-
STATICINITIALIZATION
- Siehe auch:
-
PREINITIALIZATION
- Siehe auch:
-
INITIALIZATION
- Siehe auch:
-
EXCEPTION_HANDLER
- Siehe auch:
-
SYNCHRONIZATION_LOCK
- Siehe auch:
-
SYNCHRONIZATION_UNLOCK
- Siehe auch:
-
ADVICE_EXECUTION
- Siehe auch:
-
-
Methodendetails
-
toString
String toString() -
toShortString
String toShortString()- Gibt zurück:
- an abbreviated string representation of the join point.
-
toLongString
String toLongString()- Gibt zurück:
- an extended string representation of the join point.
-
getThis
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 thethis
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.
- Gibt zurück:
- the currently executing object (or null if not available - e.g. static context)
-
getTarget
Object getTarget()Returns the target object. This will always be the same object as that matched by thetarget
pointcut designator. Unless you specifically need this reflective access, you should use thetarget
pointcut designator to get at this object for better static typing and performance. Returns null when there is no target object- Gibt zurück:
- the target object (or null if there isn't one)
-
getArgs
Object[] getArgs()- Gibt zurück:
- the arguments at this join point
-
getSignature
Signature getSignature()getStaticPart().getSignature()
returns the same object- Gibt zurück:
- the signature at the join point.
-
getSourceLocation
SourceLocation 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.- Gibt zurück:
- the source location corresponding to the join point.
-
getKind
String getKind()This string is guaranteed to be interned.getStaticPart().getKind()
returns the same object.- Gibt zurück:
- a string representing the kind of join point.
-
getStaticPart
JoinPoint.StaticPart getStaticPart()- Gibt zurück:
- an object that encapsulates the static parts of this join point.
-