Annotation Type MemberSubstitution.Origin
-
@Documented @Retention(RUNTIME) @Target(PARAMETER) public static @interface MemberSubstitution.OriginIndicates 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, aMethod,Constructororjava.lang.reflect.Executable. It can also load ajava.lang.invoke.MethodType, ajava.lang.invoke.MethodHandleor ajava.lang.invoke.MethodHandles$Lookup. Finally, it can represent the origin's modifiers if the parameter is a primitive integer type.Note: A constant representing a
MethodorConstructoris not cached but is recreated for every delegation.Important: Don't confuse this annotation with
OriginorAdvice.Origin. This annotation should be used only in combination withMemberSubstitution.Substitution.Chain.Step.ForDelegation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description MemberSubstitution.SourcesourceDetermines the source that is considered for this annotation which can be either the substituted method, constructor or field, or the instrumented method.
-
-
-
Element Detail
-
source
MemberSubstitution.Source source
Determines 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:
- net.bytebuddy.asm.MemberSubstitution.Source.SUBSTITUTED_ELEMENT
-
-