Interface Advice.OffsetMapping
- All Known Implementing Classes:
Advice.OffsetMapping.ForAllArguments, Advice.OffsetMapping.ForArgument, Advice.OffsetMapping.ForArgument.Resolved, Advice.OffsetMapping.ForArgument.Unresolved, Advice.OffsetMapping.ForDynamicConstant, 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.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, 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 interfaceAdvice.OffsetMapping.Factory<T extends Annotation>Represents a factory for creating aAdvice.OffsetMappingfor a given parameter for a given annotation.static classAn offset mapping that maps an array containing all arguments of the instrumented method.static classAn offset mapping for a given parameter of the instrumented method.static classAn offset mapping for a dynamic constant.static classAn offset mapping that provides access to the value that is returned by the enter advice.static classAn offset mapping that provides access to the value that is returned by the exit advice.static classAn offset mapping for a field.static classAn offset mapping for a field handle.static classAn offset mapping that describes a Java method handle that is resolved through the constant pool.static enumMaps a constant representing the instrumented method.static enumMaps the declaring type of the instrumented method.static classAn offset mapping that provides access to a named local variable that is declared by the advice methods viaAdvice.Local.static classAn offset mapping for theAdvice.Originannotation.static classAn offset mapping that provides access to the value that is returned by the instrumented method.static enumAn offset mapping for assigning a method handle that invokes the instrumented method.static classAn offset mapping that loads a serialized value.static classAn offset mapping for binding a stack manipulation.static enumAn offset mapping for a parameter where assignments are fully ignored and that is assigned a boxed version of the instrumented method's return value ornullif the return type is not primitive orvoid.static classAn offset mapping that provides access to thethisreference of the instrumented method.static classAn offset mapping for accessing aThrowableof the instrumented method.static classAn offset mapping for a parameter where assignments are fully ignored and that always return the parameter type's default value.static enumDescribes the sort of the executed advice.static interfaceA 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.
-