Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T extends java.lang.annotation.Annotation>
- java.lang.Object
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<T>
-
- net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T>
-
- Type Parameters:
T
- The type of the annotation.
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T>
- Enclosing class:
- MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation
@Enhance public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDynamicInvocation<T extends java.lang.annotation.Annotation> extends MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<T>
A factory that invokes a method dynamically and assignes the result to the annotated parameter.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<S extends java.lang.annotation.Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.Simple<S extends java.lang.annotation.Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly<S extends java.lang.annotation.Annotation>
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.Class<T>
annotationType
The annotation type.private java.util.List<? extends JavaConstant>
arguments
The constants to provide to the bootstrap method.private MethodDescription.InDefinedShape
bootstrapMethod
The bootstrap method to use.
-
Constructor Summary
Constructors Constructor Description OfDynamicInvocation(java.lang.Class<T> annotationType, MethodDescription.InDefinedShape bootstrapMethod, java.util.List<? extends JavaConstant> arguments)
Creates a factory for an offset mapping that assigns the result of a dynamic method invocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<T>
getAnnotationType()
Returns the type of the annotation for this factory.protected MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping
make(TypeDescription.Generic target, AnnotationDescription.Loadable<T> annotation)
Returns an offset mapping for the bound method target or parameter.-
Methods inherited from class net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase
make, make
-
-
-
-
Field Detail
-
annotationType
private final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
The annotation type.
-
bootstrapMethod
private final MethodDescription.InDefinedShape bootstrapMethod
The bootstrap method to use.
-
arguments
private final java.util.List<? extends JavaConstant> arguments
The constants to provide to the bootstrap method.
-
-
Constructor Detail
-
OfDynamicInvocation
public OfDynamicInvocation(java.lang.Class<T> annotationType, MethodDescription.InDefinedShape bootstrapMethod, java.util.List<? extends JavaConstant> arguments)
Creates a factory for an offset mapping that assigns the result of a dynamic method invocation.- Parameters:
annotationType
- The annotation type.bootstrapMethod
- The bootstrap method to use.arguments
- The constants to provide to the bootstrap method.
-
-
Method Detail
-
getAnnotationType
public java.lang.Class<T> getAnnotationType()
Returns the type of the annotation for this factory.- Returns:
- The type of the annotation for this factory.
-
make
protected MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping make(TypeDescription.Generic target, AnnotationDescription.Loadable<T> annotation)
Description copied from class:MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase
Returns an offset mapping for the bound method target or parameter.- Specified by:
make
in classMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<T extends java.lang.annotation.Annotation>
- Parameters:
target
- The declaring type of a non-static method or a parameter type.annotation
- The annotation that was found on the method or parameter.- Returns:
- An appropriate offset mapping.
-
-