@Documented @Retention(value=RUNTIME) @Target(value=PARAMETER) public static @interface MemberSubstitution.FieldGetterHandle
Indicates that the annotated parameter should be mapped to a java.lang.invoke.MethodHandle
representing a field getter.
Setting MemberSubstitution.FieldValue.value()
is optional. If the value is not set, the field value attempts to bind a setter's
or getter's field if the intercepted method is an accessor method. Otherwise, the binding renders the target method
to be an illegal candidate for binding.
Important: Don't confuse this annotation with FieldGetterHandle
or
Advice.FieldGetterHandle
. This annotation should be used only in combination with MemberSubstitution.Substitution.Chain.Step.ForDelegation
.
Modifier and Type | Optional Element and Description |
---|---|
Class<?> |
declaringType
Returns the type that declares the field that should be mapped to the annotated parameter.
|
String |
value
Returns the name of the field.
|
public abstract String value
public abstract Class<?> declaringType
void
, the field is looked up implicitly within the instrumented class's class hierarchy.
The value can also be set to TargetType
in order to look up the type on the instrumented type.void
if this type should be determined implicitly or
TargetType
for the instrumented type.Copyright © 2014–2024. All rights reserved.