Package net.bytebuddy.asm
Annotation Interface MemberSubstitution.Origin
- Enclosing class:
MemberSubstitution
@Documented
@Retention(RUNTIME)
@Target(PARAMETER)
public static @interface MemberSubstitution.Origin
Indicates that the annotated parameter should be mapped to a representation of the substituted element or
instrumented method. This representation can be a string representation, a constant representing
the Class
, a Method
, Constructor
or java.lang.reflect.Executable
. It can also load
a java.lang.invoke.MethodType
, a java.lang.invoke.MethodHandle
or a java.lang.invoke.MethodHandles$Lookup
.
Note: A constant representing a Method
or Constructor
is not cached but is recreated for
every delegation.
Important: Don't confuse this annotation with Origin
or
Advice.Origin
. This annotation should be used only in combination with MemberSubstitution.Substitution.Chain.Step.ForDelegation
.
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDetermines the source that is considered for this annotation which can be either the substituted method, constructor or field, or the instrumented method.
-
Element Details
-
source
MemberSubstitution.Source sourceDetermines the source that is considered for this annotation which can be either the substituted method, constructor or field, or the instrumented method.- Returns:
- The source that is considered for this annotation.
- Default:
SUBSTITUTED_ELEMENT
-