Each aspect is of the form
[ privileged ] Modifiers aspect Id [ extends Type ] [ implements TypeList ] [ PerClause ] { Body }where PerClause defines how the aspect is instantiated and associated (issingleton() by default):
PerClause | Description | Accessor |
---|---|---|
[ issingleton() ] | One instance of the aspect is made. This is the default. | aspectOf() at all join points |
perthis(Pointcut) | An instance is associated with each object that is the currently executing object at any join point in Pointcut. | aspectOf(Object) at all join points |
pertarget(Pointcut) | An instance is associated with each object that is the target object at any join point in Pointcut. | aspectOf(Object) at all join points |
percflow(Pointcut) | The aspect is defined for each entrance to the control flow of the join points defined by Pointcut. | aspectOf() at join points in cflow(Pointcut) |
percflowbelow(Pointcut) | The aspect is defined for each entrance to the control flow below the join points defined by Pointcut. | aspectOf() at join points in cflowbelow(Pointcut) |