|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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()); } }
Inner Class Summary | |
static interface |
JoinPoint.StaticPart
This helper object contains only the static information about a join point. |
Field Summary | |
static String |
ADVICE_EXECUTION
|
static String |
CONSTRUCTOR_CALL
|
static String |
CONSTRUCTOR_EXECUTION
|
static String |
EXCEPTION_HANDLER
|
static String |
FIELD_GET
|
static String |
FIELD_SET
|
static String |
INITIALIZATION
|
static String |
METHOD_CALL
|
static String |
METHOD_EXECUTION
The legal return values from getKind() |
static String |
PREINTIALIZATION
|
static String |
STATICINITIALIZATION
|
Method Summary | |
Object[] |
getArgs()
Returns the arguments at this join point. |
String |
getKind()
Returns a String representing the kind of join point. |
Signature |
getSignature()
Returns the signature at the join point. |
SourceLocation |
getSourceLocation()
Returns the source location corresponding to the join point. |
JoinPoint.StaticPart |
getStaticPart()
Returns an object that encapsulates the static parts of this join point. |
Object |
getTarget()
Returns the target object. |
Object |
getThis()
Returns the currently executing object. |
String |
toLongString()
Returns an extended string representation of the join point. |
String |
toShortString()
Returns an abbreviated string representation of the join point. |
String |
toString()
|
Field Detail |
public static final String METHOD_EXECUTION
public static final String METHOD_CALL
public static final String CONSTRUCTOR_EXECUTION
public static final String CONSTRUCTOR_CALL
public static final String FIELD_GET
public static final String FIELD_SET
public static final String STATICINITIALIZATION
public static final String PREINTIALIZATION
public static final String INITIALIZATION
public static final String EXCEPTION_HANDLER
public static final String ADVICE_EXECUTION
Method Detail |
public String toString()
toString
in class Object
public String toShortString()
public String toLongString()
public 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.
public Object getTarget()
Returns the target object. This will always be
the same object as that matched by the 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 object.
public Object[] getArgs()
Returns the arguments at this join point.
public Signature getSignature()
getStaticPart().getSignature()
returns the same objectpublic 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.
public String getKind()
getStaticPart().getKind()
returns
the same object.public JoinPoint.StaticPart getStaticPart()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |