Package net.bytebuddy.asm
Class Advice.OffsetMapping.ForFieldHandle.Resolved.Factory<T extends Annotation>
java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.ForFieldHandle.Resolved.Factory<T>
- Type Parameters:
T- The annotation type this factory binds.
- All Implemented Interfaces:
Advice.OffsetMapping.Factory<T>
- Enclosing class:
Advice.OffsetMapping.ForFieldHandle.Resolved
@Enhance
public static class Advice.OffsetMapping.ForFieldHandle.Resolved.Factory<T extends Annotation>
extends Object
implements Advice.OffsetMapping.Factory<T>
A factory that binds a field handle.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.OffsetMapping.Factory
Advice.OffsetMapping.Factory.AdviceType, Advice.OffsetMapping.Factory.Illegal<T extends Annotation>, Advice.OffsetMapping.Factory.Simple<T extends Annotation> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Advice.OffsetMapping.ForFieldHandle.AccessThe access type of the represented handle.The annotation type.private final FieldDescriptionThe field to be bound. -
Constructor Summary
ConstructorsConstructorDescriptionFactory(Class<T> annotationType, FieldDescription fieldDescription, Advice.OffsetMapping.ForFieldHandle.Access access) Creates a new factory for binding a specific field handle. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation type of this factory.make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.
-
Field Details
-
annotationType
The annotation type. -
fieldDescription
The field to be bound. -
access
The access type of the represented handle.
-
-
Constructor Details
-
Factory
public Factory(Class<T> annotationType, FieldDescription fieldDescription, Advice.OffsetMapping.ForFieldHandle.Access access) Creates a new factory for binding a specific field handle.- Parameters:
annotationType- The annotation type.fieldDescription- The field to bind.access- The access type of the represented handle.
-
-
Method Details
-
getAnnotationType
Returns the annotation type of this factory.- Specified by:
getAnnotationTypein interfaceAdvice.OffsetMapping.Factory<T extends Annotation>- Returns:
- The factory's annotation type.
-
make
public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.- Specified by:
makein interfaceAdvice.OffsetMapping.Factory<T extends Annotation>- Parameters:
target- The parameter description for which to resolve an offset mapping.annotation- The annotation that triggered this factory.adviceType-trueif the binding is applied using advice method delegation.- Returns:
- A resolved offset mapping or
nullif no mapping can be resolved for this parameter.
-