Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfAnnotationProperty<T extends Annotation>
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly<T>
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfAnnotationProperty<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.OfAnnotationProperty<T extends Annotation>
extends MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly<T>
A factory that binds a given annotation property to the 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 Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.Simple<S extends Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly<S extends Annotation>
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe annotation type.private final MethodDescription.InDefinedShape
The annotation property to resolve. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
OfAnnotationProperty
(Class<T> annotationType, MethodDescription.InDefinedShape property) Creates a factory for assigning an annotation property to the annotated parameter. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the annotation for this factory.make
(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for a parameter of the method or constructor that is the delegation target.static <S extends Annotation>
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<S> Resolves an offset mapping factory where the provided property is assigned to any parameter that is annotated with the given annotation.Methods inherited from class net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly
make
-
Field Details
-
annotationType
The annotation type. -
property
The annotation property to resolve.
-
-
Constructor Details
-
OfAnnotationProperty
Creates a factory for assigning an annotation property to the annotated parameter.- Parameters:
annotationType
- The annotation type.property
- The annotation property to resolve.
-
-
Method Details
-
of
public static <S extends Annotation> MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<S> of(Class<S> annotationType, String property) Resolves an offset mapping factory where the provided property is assigned to any parameter that is annotated with the given annotation.- Type Parameters:
S
- The type of the annotation from which the property is read.- Parameters:
annotationType
- The annotation type.property
- The name of the property on the- Returns:
- An appropriate factory for an offset mapping.
-
getAnnotationType
Returns the type of the annotation for this factory.- Returns:
- The type of the annotation for this factory.
-
make
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for a parameter of the method or constructor that is the delegation target.- Parameters:
target
- The parameter that is bound to an expression.annotation
- The annotation that was found on the parameter.- Returns:
- An appropriate offset mapping.
-