org.aspectj.lang
Interface JoinPoint
- ProceedingJoinPoint
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());
}
}
ADVICE_EXECUTION
public static final String ADVICE_EXECUTION
CONSTRUCTOR_CALL
public static final String CONSTRUCTOR_CALL
CONSTRUCTOR_EXECUTION
public static final String CONSTRUCTOR_EXECUTION
EXCEPTION_HANDLER
public static final String EXCEPTION_HANDLER
FIELD_GET
public static final String FIELD_GET
FIELD_SET
public static final String FIELD_SET
INITIALIZATION
public static final String INITIALIZATION
METHOD_CALL
public static final String METHOD_CALL
METHOD_EXECUTION
public static final String METHOD_EXECUTION
The legal return values from getKind()
PREINITIALIZATION
public static final String PREINITIALIZATION
STATICINITIALIZATION
public static final String STATICINITIALIZATION
SYNCHRONIZATION_LOCK
public static final String SYNCHRONIZATION_LOCK
SYNCHRONIZATION_UNLOCK
public static final String SYNCHRONIZATION_UNLOCK
getArgs
public Object[] getArgs()
Returns the arguments at this join point.
getKind
public String getKind()
Returns a String representing the kind of join point. This
String is guaranteed to be
interned. getStaticPart().getKind()
returns
the same object.
getSignature
public Signature getSignature()
Returns the signature at the join point.
getStaticPart().getSignature()
returns the same object
getSourceLocation
public 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.
getStaticPart
public JoinPoint.StaticPart getStaticPart()
Returns an object that encapsulates the static parts of this join point.
getTarget
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.
getThis
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.
toLongString
public String toLongString()
Returns an extended string representation of the join point.
toShortString
public String toShortString()
Returns an abbreviated string representation of the join point.
toString
public String toString()