Access keys

AbstractAdvice

Kind of class: class
Inherits from: BasicClass
Known subclasses:
Author: Simon Wacker
Classpath: org.as2lib.aop.advice.AbstractAdvice
File last modified: Tuesday, 16 August 2005, 21:26:48
AbstractAdvice implements methods commonly needed by Adivce
implementations.

Class properties

AFTER

static AFTER:Number = 2
(read,write)
Signifies an after advice.

AFTER_RETURNING

static AFTER_RETURNING:Number = 3
(read,write)
Signifies an after returning advice.

AFTER_THROWING

static AFTER_THROWING:Number = 4
(read,write)
Signifies an after throwing advice.

AROUND

static AROUND:Number = 1
(read,write)
Signifies an around advice.

BEFORE

static BEFORE:Number = 0
(read,write)
Signifies a before advice.

Instance methods

captures

function captures (
joinPoint:JoinPoint) : Boolean
Checks whether this advice captures the given joinPoint. This check is
done with the help of the set pointcut's captures method.

If there is no pointcut set, true will be returned.

Parameters:
joinPoint:
the join point upon which to make the check
Returns:
true if the given joinPoint is captured else false

getAspect

function getAspect (
Void) : Aspect
Returns the aspect that contains this advice.
Returns:
the aspect that contains this advice

getPointcut

function getPointcut (
Void) : Pointcut
Returns the set pointcut.
Returns:
the set pointcut

getProxy

function getProxy (
joinPoint:JoinPoint) : Function
Returns a proxy method that can be used instead of the original method of the
joinPoint.

The returned proxy invokes the abstract executeJoinPoint method of
this advice passing an update of the given joinPoint with the appropriate
logical this and the arguments used for the proxy invocation. Sub-classes are
responsible for implementing this method in the correct way.

Parameters:
joinPoint:
the join point that represents the original method
Returns:
the proxy method