Package net.bytebuddy.asm
Annotation Type Advice.Argument
-
@Documented @Retention(RUNTIME) @Target(PARAMETER) public static @interface Advice.ArgumentIndicates that the annotated parameter should be mapped to the parameter with index
value()of the instrumented method.Important: Don't confuse this annotation with
ArgumentorMemberSubstitution.Argument. This annotation should be used only in combination withAdvice.- See Also:
Advice,Advice.OnMethodEnter,Advice.OnMethodExit
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description intvalueReturns the index of the mapped parameter.
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleanoptionalIndicates if a parameter binding is optional.booleanreadOnlyIndicates if it is possible to write to this parameter.Assigner.TypingtypingThe typing that should be applied when assigning the argument.
-
-
-
-
readOnly
boolean readOnly
Indicates 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 typing
The typing that should be applied when assigning the argument.- Returns:
- The typing to apply upon assignment.
- Default:
- net.bytebuddy.implementation.bytecode.assign.Assigner.Typing.STATIC
-
-