Annotation Interface Advice.AllArguments
- Enclosing class:
Advice
Assigns an array containing all arguments of the instrumented method to the annotated parameter. The annotated parameter must
be an array type. If the annotation indicates writability, the assigned array must have at least as many values as the
instrumented method or an ArrayIndexOutOfBoundsException is thrown.
Important: Don't confuse this annotation with AllArguments or
MemberSubstitution.AllArguments. This annotation should be used only in combination with Advice.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDetermines if the produced array should include the instrumented method's target reference within the array, if the instrumented method is non-static.booleanDetermines if anullvalue should be assigned if the instrumented method does not declare any parameters.booleanIndicates if it is possible to write to this parameter.The typing that should be applied when assigning the arguments.
-
Element Details
-
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 arguments.- Returns:
- The typing to apply upon assignment.
- Default:
STATIC
-
includeSelf
boolean includeSelfDetermines if the produced array should include the instrumented method's target reference within the array, if the instrumented method is non-static.- Returns:
trueif the method's target instance should be considered an element of the produced array.
- Default:
false
-
nullIfEmpty
boolean nullIfEmptyDetermines if anullvalue should be assigned if the instrumented method does not declare any parameters. If this option is set and a value is written to annotated parameter, the operation remains without effect.- Returns:
trueif anullvalue should be assigned if the instrumented method does not declare any parameters.
- Default:
false
-