Package net.bytebuddy.asm
Class Advice.OffsetMapping.ForEnterValue.Factory
java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.ForEnterValue.Factory
- All Implemented Interfaces:
Advice.OffsetMapping.Factory<Advice.Enter>
- Enclosing class:
Advice.OffsetMapping.ForEnterValue
@Enhance
protected static class Advice.OffsetMapping.ForEnterValue.Factory
extends Object
implements Advice.OffsetMapping.Factory<Advice.Enter>
A factory for creating a
Advice.OffsetMapping.ForEnterValue offset mapping.-
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 static final MethodDescription.InDefinedShapeA description of theAdvice.Argument.readOnly()method.private static final MethodDescription.InDefinedShapeA description of theAdvice.Argument.typing()method.private final TypeDefinitionThe supplied type of the enter advice. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFactory(TypeDefinition enterType) Creates a new factory for creating aAdvice.OffsetMapping.ForEnterValueoffset mapping. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation type of this factory.make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Enter> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.protected static Advice.OffsetMapping.Factory<Advice.Enter> of(TypeDefinition typeDefinition) Creates a new factory for creating aAdvice.OffsetMapping.ForEnterValueoffset mapping.
-
Field Details
-
ENTER_READ_ONLY
A description of theAdvice.Argument.readOnly()method. -
ENTER_TYPING
A description of theAdvice.Argument.typing()method. -
enterType
The supplied type of the enter advice.
-
-
Constructor Details
-
Factory
Creates a new factory for creating aAdvice.OffsetMapping.ForEnterValueoffset mapping.- Parameters:
enterType- The supplied type of the enter method.
-
-
Method Details
-
of
Creates a new factory for creating aAdvice.OffsetMapping.ForEnterValueoffset mapping.- Parameters:
typeDefinition- The supplied type of the enter advice.- Returns:
- An appropriate offset mapping factory.
-
getAnnotationType
Returns the annotation type of this factory.- Specified by:
getAnnotationTypein interfaceAdvice.OffsetMapping.Factory<Advice.Enter>- Returns:
- The factory's annotation type.
-
make
public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Enter> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.- Specified by:
makein interfaceAdvice.OffsetMapping.Factory<Advice.Enter>- 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.
-