Class Advice.OffsetMapping.ForLocalValue.Factory
java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.ForLocalValue.Factory
- All Implemented Interfaces:
Advice.OffsetMapping.Factory<Advice.Local>
- Enclosing class:
Advice.OffsetMapping.ForLocalValue
@Enhance
protected static class Advice.OffsetMapping.ForLocalValue.Factory
extends Object
implements Advice.OffsetMapping.Factory<Advice.Local>
A factory for an offset mapping for a local variable that is declared by the advice methods via
Advice.Local.-
Nested Class Summary
Nested classes/interfaces inherited from interface Advice.OffsetMapping.Factory
Advice.OffsetMapping.Factory.AdviceType, Advice.OffsetMapping.Factory.Illegal<T>, Advice.OffsetMapping.Factory.Simple<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final MethodDescription.InDefinedShapeA description of theAdvice.Local.value()method.private final Map<String, TypeDefinition> The mapping of type names to their type that are available. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFactory(Map<String, TypeDefinition> namedTypes) Creates a factory for aAdvice.Localvariable mapping. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation type of this factory.make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Local> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.
-
Field Details
-
LOCAL_VALUE
A description of theAdvice.Local.value()method. -
namedTypes
The mapping of type names to their type that are available.
-
-
Constructor Details
-
Factory
Creates a factory for aAdvice.Localvariable mapping.- Parameters:
namedTypes- The mapping of type names to their type that are available.
-
-
Method Details
-
getAnnotationType
Returns the annotation type of this factory.- Specified by:
getAnnotationTypein interfaceAdvice.OffsetMapping.Factory<Advice.Local>- Returns:
- The factory's annotation type.
-
make
public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Local> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.- Specified by:
makein interfaceAdvice.OffsetMapping.Factory<Advice.Local>- 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.
-