Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfAnnotationProperty<T extends java.lang.annotation.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 java.lang.annotation.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 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 MethodDescription.InDefinedShape
property
The annotation property to resolve.
-
Constructor Summary
Constructors Modifier Constructor Description protected
OfAnnotationProperty(java.lang.Class<T> annotationType, MethodDescription.InDefinedShape property)
Creates a factory for assigning an annotation property to the annotated parameter.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Class<T>
getAnnotationType()
Returns the type of the annotation for this factory.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.static <S extends java.lang.annotation.Annotation>
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<S>of(java.lang.Class<S> annotationType, java.lang.String property)
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 Detail
-
annotationType
private final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
The annotation type.
-
property
private final MethodDescription.InDefinedShape property
The annotation property to resolve.
-
-
Constructor Detail
-
OfAnnotationProperty
protected OfAnnotationProperty(java.lang.Class<T> annotationType, MethodDescription.InDefinedShape property)
Creates a factory for assigning an annotation property to the annotated parameter.- Parameters:
annotationType
- The annotation type.property
- The annotation property to resolve.
-
-
Method Detail
-
of
public static <S extends java.lang.annotation.Annotation> MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<S> of(java.lang.Class<S> annotationType, java.lang.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
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
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.
-
-