Annotation Type Advice.Argument
- Enclosing class:
Advice
Indicates that the annotated parameter should be mapped to the parameter with index value() of
the instrumented method.
Important: Don't confuse this annotation with Argument or
MemberSubstitution.Argument. This annotation should be used only in combination with Advice.
- See Also:
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanIndicates if a parameter binding is optional.booleanIndicates if it is possible to write to this parameter.The typing that should be applied when assigning the argument.
-
Element Details
-
value
int valueReturns the index of the mapped parameter.- Returns:
- The index of the mapped parameter.
-
readOnly
boolean readOnlyIndicates if it is possible to write to this parameter. If this property is set to
false, the annotated type must be equal to the type declaring the instrumented method if the typing is not also set toAssigner.Typing.DYNAMIC. If this property is set totrue, the annotated parameter can be any super type of the instrumented method's declaring type.Important: This property must be set to
trueif the advice method is not inlined.- Returns:
trueif this parameter is read-only.
- Default:
true
-
typing
Assigner.Typing typingThe typing that should be applied when assigning the argument.- Returns:
- The typing to apply upon assignment.
- Default:
STATIC
-
optional
boolean optionalIndicates if a parameter binding is optional. If a binding is optional and a parameter with the specified index does not exist, the parameter's default value is bound.- Returns:
trueif the binding is optional.
- Default:
false
-