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.OffsetMappingRepresents an offset mapping for an advice method to an alternative offset.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceAdvice.OffsetMapping.Factory<T extends java.lang.annotation.Annotation>Represents a factory for creating aAdvice.OffsetMappingfor a given parameter for a given annotation.static classAdvice.OffsetMapping.ForAllArgumentsAn offset mapping that maps an array containing all arguments of the instrumented method.static classAdvice.OffsetMapping.ForArgumentAn offset mapping for a given parameter of the instrumented method.static classAdvice.OffsetMapping.ForEnterValueAn offset mapping that provides access to the value that is returned by the enter advice.static classAdvice.OffsetMapping.ForExitValueAn offset mapping that provides access to the value that is returned by the exit advice.static classAdvice.OffsetMapping.ForFieldAn offset mapping for a field.static classAdvice.OffsetMapping.ForInstrumentedMethodMaps a constant representing the instrumented method.static classAdvice.OffsetMapping.ForInstrumentedTypeMaps the declaring type of the instrumented method.static classAdvice.OffsetMapping.ForLocalValueAn offset mapping that provides access to a named local variable that is declared by the advice methods viaAdvice.Local.static classAdvice.OffsetMapping.ForOriginAn offset mapping for theAdvice.Originannotation.static classAdvice.OffsetMapping.ForReturnValueAn offset mapping that provides access to the value that is returned by the instrumented method.static classAdvice.OffsetMapping.ForSerializedValueAn offset mapping that loads a serialized value.static classAdvice.OffsetMapping.ForStackManipulationAn offset mapping for binding a stack manipulation.static classAdvice.OffsetMapping.ForStubValueAn 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 classAdvice.OffsetMapping.ForThisReferenceAn offset mapping that provides access to thethisreference of the instrumented method.static classAdvice.OffsetMapping.ForThrowableAn offset mapping for accessing aThrowableof the instrumented method.static classAdvice.OffsetMapping.ForUnusedValueAn offset mapping for a parameter where assignments are fully ignored and that always return the parameter type's default value.static classAdvice.OffsetMapping.SortDescribes the sort of the executed advice.static interfaceAdvice.OffsetMapping.TargetA target offset of an offset mapping.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
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.
-
-