@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public @interface AllArguments
Parameters that are annotated with this annotation will be assigned an array of all arguments of the instrumented method.
By default, this annotation applies a
AllArguments.Assignment.STRICT
assignment of the source method's parameters to the array. This implies that parameters that are not assignable to
the annotated array's component type make the method with this parameter unbindable. To avoid this, you can
use a AllArguments.Assignment.SLACK
assignment
which simply skips non-assignable values instead.
Important: Don't confuse this annotation with Advice.AllArguments
or
MemberSubstitution.AllArguments
. This annotation should be used with
MethodDelegation
only.
Modifier and Type | Optional Element and Description |
---|---|
boolean |
includeSelf
Determines if the array should contain the instance that defines the intercepted value when intercepting
a non-static method.
|
boolean |
nullIfEmpty
Determines if a
null value should be assigned if the instrumented method does not declare any parameters. |
AllArguments.Assignment |
value
Defines the type of
AllArguments.Assignment
type that is applied for filling the annotated array with values. |
public abstract AllArguments.Assignment value
AllArguments.Assignment
type that is applied for filling the annotated array with values.public abstract boolean includeSelf
true
if the instance on which the intercepted method should be invoked should be
included in the array containing the arguments.Copyright © 2014–2024. All rights reserved.