Package net.bytebuddy.asm
Class Advice.OffsetMapping.ForArgument.Unresolved
- java.lang.Object
-
- net.bytebuddy.asm.Advice.OffsetMapping.ForArgument
-
- net.bytebuddy.asm.Advice.OffsetMapping.ForArgument.Unresolved
-
- All Implemented Interfaces:
Advice.OffsetMapping
- Enclosing class:
- Advice.OffsetMapping.ForArgument
@Enhance public static class Advice.OffsetMapping.ForArgument.Unresolved extends Advice.OffsetMapping.ForArgument
An offset mapping for a parameter of the instrumented method with a specific index.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAdvice.OffsetMapping.ForArgument.Unresolved.FactoryA factory for a mapping of a parameter of the instrumented method.-
Nested classes/interfaces inherited from class net.bytebuddy.asm.Advice.OffsetMapping.ForArgument
Advice.OffsetMapping.ForArgument.Resolved, Advice.OffsetMapping.ForArgument.Unresolved
-
Nested classes/interfaces inherited from interface net.bytebuddy.asm.Advice.OffsetMapping
Advice.OffsetMapping.ForAllArguments, Advice.OffsetMapping.ForArgument, Advice.OffsetMapping.ForDynamicConstant, Advice.OffsetMapping.ForEnterValue, Advice.OffsetMapping.ForExitValue, Advice.OffsetMapping.ForField, Advice.OffsetMapping.ForFieldHandle, Advice.OffsetMapping.ForHandle, Advice.OffsetMapping.ForInstrumentedMethod, Advice.OffsetMapping.ForInstrumentedType, Advice.OffsetMapping.ForLocalValue, Advice.OffsetMapping.ForOrigin, Advice.OffsetMapping.ForReturnValue, Advice.OffsetMapping.ForSelfCallHandle, Advice.OffsetMapping.ForSerializedValue, Advice.OffsetMapping.ForStackManipulation, Advice.OffsetMapping.ForStubValue, Advice.OffsetMapping.ForThisReference, Advice.OffsetMapping.ForThrowable, Advice.OffsetMapping.ForUnusedValue, Advice.OffsetMapping.Sort, Advice.OffsetMapping.Target
-
-
Field Summary
Fields Modifier and Type Field Description private intindexThe index of the parameter.private booleanoptionaltrueif the parameter binding is optional.-
Fields inherited from class net.bytebuddy.asm.Advice.OffsetMapping.ForArgument
readOnly, target
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedUnresolved(ParameterDescription parameterDescription)Creates a new offset binding for a parameter with a given index.Unresolved(TypeDescription.Generic target, boolean readOnly, Assigner.Typing typing, int index)Creates a non-optional offset binding for a parameter with a given index.Unresolved(TypeDescription.Generic target, boolean readOnly, Assigner.Typing typing, int index, boolean optional)Creates a new offset binding for a parameter with a given index.protectedUnresolved(TypeDescription.Generic target, AnnotationDescription.Loadable<Advice.Argument> annotation)Creates a new offset binding for a parameter with a given index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ParameterDescriptionresolve(MethodDescription instrumentedMethod)Resolves the bound parameter.Advice.OffsetMapping.Targetresolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, Advice.OffsetMapping.Sort sort)Resolves an offset mapping to a given target offset.
-
-
-
Constructor Detail
-
Unresolved
protected Unresolved(TypeDescription.Generic target, AnnotationDescription.Loadable<Advice.Argument> annotation)
Creates a new offset binding for a parameter with a given index.- Parameters:
target- The target type.annotation- The annotation that triggers this binding.
-
Unresolved
protected Unresolved(ParameterDescription parameterDescription)
Creates a new offset binding for a parameter with a given index.- Parameters:
parameterDescription- The parameter triggering this binding.
-
Unresolved
public Unresolved(TypeDescription.Generic target, boolean readOnly, Assigner.Typing typing, int index)
Creates a non-optional offset binding for a parameter with a given index.- Parameters:
target- The type expected by the advice method.readOnly- Determines if the parameter is to be treated as read-only.typing- The typing to apply.index- The index of the parameter.
-
Unresolved
public Unresolved(TypeDescription.Generic target, boolean readOnly, Assigner.Typing typing, int index, boolean optional)
Creates a new offset binding for a parameter with a given index.- Parameters:
target- The type expected by the advice method.readOnly- Determines if the parameter is to be treated as read-only.typing- The typing to apply.index- The index of the parameter.optional-trueif the parameter binding is optional.
-
-
Method Detail
-
resolve
protected ParameterDescription resolve(MethodDescription instrumentedMethod)
Description copied from class:Advice.OffsetMapping.ForArgumentResolves the bound parameter.- Specified by:
resolvein classAdvice.OffsetMapping.ForArgument- Parameters:
instrumentedMethod- The instrumented method.- Returns:
- The bound parameter.
-
resolve
public Advice.OffsetMapping.Target resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, Advice.OffsetMapping.Sort sort)
Resolves an offset mapping to a given target offset.- Specified by:
resolvein interfaceAdvice.OffsetMapping- Overrides:
resolvein classAdvice.OffsetMapping.ForArgument- Parameters:
instrumentedType- The instrumented type.instrumentedMethod- The instrumented method for which the mapping is to be resolved.assigner- The assigner to use.argumentHandler- The argument handler to use for resolving offsets of the local variable array of the instrumented method.sort- The sort of the advice method being resolved.- Returns:
- A suitable target mapping.
-
-