Class Advice.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T extends Annotation>
java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T>
- Type Parameters:
T- The annotation type this factory binds.
- All Implemented Interfaces:
Advice.OffsetMapping.Factory<T>
- Enclosing class:
Advice.OffsetMapping.ForStackManipulation
@Enhance
public static class Advice.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T extends Annotation>
extends Object
implements Advice.OffsetMapping.Factory<T>
Uses dynamic method invocation for binding an annotated parameter to a value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Advice.OffsetMapping.Factory
Advice.OffsetMapping.Factory.AdviceType, Advice.OffsetMapping.Factory.Illegal<T>, Advice.OffsetMapping.Factory.Simple<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe annotation type.private final List<? extends JavaConstant> The arguments to the bootstrap method.private final MethodDescription.InDefinedShapeThe bootstrap method or constructor. -
Constructor Summary
ConstructorsConstructorDescriptionOfDynamicInvocation(Class<T> annotationType, MethodDescription.InDefinedShape bootstrapMethod, List<? extends JavaConstant> arguments) Creates a new factory for a dynamic invocation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation type of this factory.make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.
-
Field Details
-
annotationType
The annotation type. -
bootstrapMethod
The bootstrap method or constructor. -
arguments
The arguments to the bootstrap method.
-
-
Constructor Details
-
OfDynamicInvocation
public OfDynamicInvocation(Class<T> annotationType, MethodDescription.InDefinedShape bootstrapMethod, List<? extends JavaConstant> arguments) Creates a new factory for a dynamic invocation.- Parameters:
annotationType- The annotation type.bootstrapMethod- The bootstrap method or constructor.arguments- The arguments to the bootstrap method.
-
-
Method Details
-
getAnnotationType
Returns the annotation type of this factory.- Specified by:
getAnnotationTypein interfaceAdvice.OffsetMapping.Factory<T extends Annotation>- Returns:
- The factory's annotation type.
-
make
public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.- Specified by:
makein interfaceAdvice.OffsetMapping.Factory<T extends Annotation>- Parameters:
target- The parameter description for which to resolve an offset mapping.annotation- The annotation that triggered this factory.adviceType-trueif the binding is applied using advice method delegation.- Returns:
- A resolved offset mapping or
nullif no mapping can be resolved for this parameter.
-