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.ForInstrumentedMethod
,Advice.OffsetMapping.ForInstrumentedType
,Advice.OffsetMapping.ForLocalValue
,Advice.OffsetMapping.ForOrigin
,Advice.OffsetMapping.ForReturnValue
,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 Classes Modifier and Type Interface Description static interface
Advice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>
Represents a factory for creating aAdvice.OffsetMapping
for a given parameter for a given annotation.static class
Advice.OffsetMapping.ForAllArguments
An offset mapping that maps an array containing all arguments of the instrumented method.static class
Advice.OffsetMapping.ForArgument
An offset mapping for a given parameter of the instrumented method.static class
Advice.OffsetMapping.ForEnterValue
An offset mapping that provides access to the value that is returned by the enter advice.static class
Advice.OffsetMapping.ForExitValue
An offset mapping that provides access to the value that is returned by the exit advice.static class
Advice.OffsetMapping.ForField
An offset mapping for a field.static class
Advice.OffsetMapping.ForInstrumentedMethod
Maps a constant representing the instrumented method.static class
Advice.OffsetMapping.ForInstrumentedType
Maps the declaring type of the instrumented method.static class
Advice.OffsetMapping.ForLocalValue
An offset mapping that provides access to a named local variable that is declared by the advice methods viaAdvice.Local
.static class
Advice.OffsetMapping.ForOrigin
An offset mapping for theAdvice.Origin
annotation.static class
Advice.OffsetMapping.ForReturnValue
An offset mapping that provides access to the value that is returned by the instrumented method.static class
Advice.OffsetMapping.ForSerializedValue
An offset mapping that loads a serialized value.static class
Advice.OffsetMapping.ForStackManipulation
An offset mapping for binding a stack manipulation.static class
Advice.OffsetMapping.ForStubValue
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
Advice.OffsetMapping.ForThisReference
An offset mapping that provides access to thethis
reference of the instrumented method.static class
Advice.OffsetMapping.ForThrowable
An offset mapping for accessing aThrowable
of the instrumented method.static class
Advice.OffsetMapping.ForUnusedValue
An offset mapping for a parameter where assignments are fully ignored and that always return the parameter type's default value.static class
Advice.OffsetMapping.Sort
Describes the sort of the executed advice.static interface
Advice.OffsetMapping.Target
A target offset of an offset mapping.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
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.
-
-