|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||
@Target(value=PARAMETER) @Retention(value=RUNTIME) public @interface Arg
Use this annotation on advice parameters that should contain values of
advised joinpoint arguments.
What are the arguments of a joinpoint depends on the type of the joinpoint itself.
For instance, if the intercepted joinpoint is a method execution, its arguments
are the method arguments.
If the optional index attribute is not defined, JBoss AOP will match
the @Arg annotated parameter with the joinpoint argument closest with
the closest type.
Look at the following example:
In this scenario, JBoss AOP will match
To learn how JBoss AOP will match Arg annotated parameters with joinpoint
arguments in more complex scenarios, please, refer to the Reference Manual
documentation.
| Optional Element Summary | |
|---|---|
int |
index
Indicates which joinpoint argument this advice parameter refers to. |
public abstract int index
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | |||||||||