Package net.bytebuddy.asm
Interface Advice.OffsetMapping
- All Known Implementing Classes:
Advice.OffsetMapping.ForAllArguments
,Advice.OffsetMapping.ForArgument
,Advice.OffsetMapping.ForArgument.Resolved
,Advice.OffsetMapping.ForArgument.Unresolved
,Advice.OffsetMapping.ForEnterValue
,Advice.OffsetMapping.ForExitValue
,Advice.OffsetMapping.ForField
,Advice.OffsetMapping.ForField.Resolved
,Advice.OffsetMapping.ForField.Unresolved
,Advice.OffsetMapping.ForField.Unresolved.WithExplicitType
,Advice.OffsetMapping.ForField.Unresolved.WithImplicitType
,Advice.OffsetMapping.ForFieldHandle
,Advice.OffsetMapping.ForFieldHandle.Resolved
,Advice.OffsetMapping.ForFieldHandle.Unresolved
,Advice.OffsetMapping.ForFieldHandle.Unresolved.WithExplicitType
,Advice.OffsetMapping.ForFieldHandle.Unresolved.WithImplicitType
,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
,CachedReturnPlugin.CacheFieldOffsetMapping
- Enclosing class:
Advice
public static interface Advice.OffsetMapping
Represents an offset mapping for an advice method to an alternative offset.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Advice.OffsetMapping.Factory<T extends Annotation>
Represents a factory for creating aAdvice.OffsetMapping
for a given parameter for a given annotation.static class
An offset mapping that maps an array containing all arguments of the instrumented method.static class
An offset mapping for a given parameter of the instrumented method.static class
An offset mapping that provides access to the value that is returned by the enter advice.static class
An offset mapping that provides access to the value that is returned by the exit advice.static class
An offset mapping for a field.static class
An offset mapping for a field handle.static enum
Maps a constant representing the instrumented method.static enum
Maps the declaring type of the instrumented method.static class
An offset mapping that provides access to a named local variable that is declared by the advice methods viaAdvice.Local
.static class
An offset mapping for theAdvice.Origin
annotation.static class
An offset mapping that provides access to the value that is returned by the instrumented method.static enum
An offset mapping for assigning a method handle that invokes the instrumented method.static class
An offset mapping that loads a serialized value.static class
An offset mapping for binding a stack manipulation.static enum
An offset mapping for a parameter where assignments are fully ignored and that is assigned a boxed version of the instrumented method's return value ornull
if the return type is not primitive orvoid
.static class
An offset mapping that provides access to thethis
reference of the instrumented method.static class
An offset mapping for accessing aThrowable
of the instrumented method.static class
An offset mapping for a parameter where assignments are fully ignored and that always return the parameter type's default value.static enum
Describes the sort of the executed advice.static interface
A target offset of an offset mapping. -
Method Summary
Modifier and TypeMethodDescriptionresolve
(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, Advice.OffsetMapping.Sort sort) Resolves an offset mapping to a given target offset.
-
Method Details
-
resolve
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.- 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.
-