Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Resolved.Factory<T extends java.lang.annotation.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 java.lang.annotation.Annotation> extends java.lang.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 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 MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.AccessaccessThe type of access.private java.lang.Class<T>annotationTypeThe annotation type.private FieldDescriptionfieldDescriptionThe field being accessed.
-
Constructor Summary
Constructors Constructor Description Factory(java.lang.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
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.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMappingmake(MethodDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation)Creates an offset mapping for an annotation that was found on a non-static method.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMappingmake(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 Detail
-
annotationType
private final java.lang.Class<T extends java.lang.annotation.Annotation> annotationType
The annotation type.
-
fieldDescription
private final FieldDescription fieldDescription
The field being accessed.
-
access
private final MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForFieldHandle.Access access
The type of access.
-
-
Constructor Detail
-
Factory
public Factory(java.lang.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 Detail
-
getAnnotationType
public java.lang.Class<T> getAnnotationType()
Returns the type of the annotation for this factory.- Specified by:
getAnnotationTypein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends java.lang.annotation.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 java.lang.annotation.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 java.lang.annotation.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.
-
-