Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Resolved.Factory<T extends Annotation>
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Resolved.Factory<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.ForFieldHandle.Resolved
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Resolved.Factory<T extends Annotation>
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T>
A factory to create an offset mapping for a resolved field handle.
-
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 TypeFieldDescriptionprivate final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.AccessThe type of access.The annotation type.private final FieldDescriptionThe field being accessed. -
Constructor Summary
ConstructorsConstructorDescriptionFactory(Class<T> annotationType, FieldDescription fieldDescription, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Access access) Creates a new factory for a field access handle. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the annotation for this factory.make(MethodDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for an annotation that was found on a non-static method.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.
-
Field Details
-
annotationType
The annotation type. -
fieldDescription
The field being accessed. -
access
private final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Access accessThe type of access.
-
-
Constructor Details
-
Factory
public Factory(Class<T> annotationType, FieldDescription fieldDescription, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Access access) Creates a new factory for a field access handle.- Parameters:
annotationType- The annotation type.fieldDescription- The field being accessed.access- The type of access.
-
-
Method Details
-
getAnnotationType
Returns the type of the annotation for this factory.- Specified by:
getAnnotationTypein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends Annotation>- Returns:
- The type of the annotation for this factory.
-
make
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping make(MethodDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for an annotation that was found on a non-static method.- Specified by:
makein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends Annotation>- Parameters:
target- The method that is the delegated to.annotation- The annotation that was found on the method.- Returns:
- An appropriate offset mapping.
-
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.- Specified by:
makein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends Annotation>- Parameters:
target- The parameter that is bound to an expression.annotation- The annotation that was found on the parameter.- Returns:
- An appropriate offset mapping.
-