Package net.bytebuddy.asm
Class Advice.OffsetMapping.ForExitValue.Factory
java.lang.Object
net.bytebuddy.asm.Advice.OffsetMapping.ForExitValue.Factory
- All Implemented Interfaces:
Advice.OffsetMapping.Factory<Advice.Exit>
- Enclosing class:
- Advice.OffsetMapping.ForExitValue
@Enhance
protected static class Advice.OffsetMapping.ForExitValue.Factory
extends Object
implements Advice.OffsetMapping.Factory<Advice.Exit>
A factory for creating a
Advice.OffsetMapping.ForExitValue
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.InDefinedShape
A description of theAdvice.Exit.readOnly()
method.private static final MethodDescription.InDefinedShape
A description of theAdvice.Exit.typing()
method.private final TypeDefinition
The supplied type of the exit advice. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Factory
(TypeDefinition exitType) Creates a new factory for creating aAdvice.OffsetMapping.ForExitValue
offset mapping. -
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation type of this factory.make
(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Exit> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.protected static Advice.OffsetMapping.Factory<Advice.Exit>
of
(TypeDefinition typeDefinition) Creates a new factory for creating aAdvice.OffsetMapping.ForExitValue
offset mapping.
-
Field Details
-
EXIT_READ_ONLY
A description of theAdvice.Exit.readOnly()
method. -
EXIT_TYPING
A description of theAdvice.Exit.typing()
method. -
exitType
The supplied type of the exit advice.
-
-
Constructor Details
-
Factory
Creates a new factory for creating aAdvice.OffsetMapping.ForExitValue
offset mapping.- Parameters:
exitType
- The supplied type of the exit advice.
-
-
Method Details
-
of
Creates a new factory for creating aAdvice.OffsetMapping.ForExitValue
offset mapping.- Parameters:
typeDefinition
- The supplied type of the enter method.- Returns:
- An appropriate offset mapping factory.
-
getAnnotationType
Returns the annotation type of this factory.- Specified by:
getAnnotationType
in interfaceAdvice.OffsetMapping.Factory<Advice.Exit>
- Returns:
- The factory's annotation type.
-
make
public Advice.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<Advice.Exit> annotation, Advice.OffsetMapping.Factory.AdviceType adviceType) Creates a new offset mapping for the supplied parameter if possible.- Specified by:
make
in interfaceAdvice.OffsetMapping.Factory<Advice.Exit>
- Parameters:
target
- The parameter description for which to resolve an offset mapping.annotation
- The annotation that triggered this factory.adviceType
-true
if the binding is applied using advice method delegation.- Returns:
- A resolved offset mapping or
null
if no mapping can be resolved for this parameter.
-