Interface Advice.AssignReturned.Handler
- All Known Implementing Classes:
Advice.AssignReturned.ToAllArguments.Handler, Advice.AssignReturned.ToArguments.Handler, Advice.AssignReturned.ToFields.Handler, Advice.AssignReturned.ToReturned.Handler, Advice.AssignReturned.ToThis.Handler, Advice.AssignReturned.ToThrown.Handler
- Enclosing class:
Advice.AssignReturned
public static interface Advice.AssignReturned.Handler
A handler for an
Advice.AssignReturned post processor to assign a value that was returned by
advice to a value of the instrumented method.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA factory for resolving a handler for a given advice method. -
Method Summary
Modifier and TypeMethodDescriptionintgetIndex()Returns the array offset which this handler intends to assign or a negative value if this handler intends to assign a scalar value.resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, TypeDescription type, StackManipulation value) Resolves this handler.
-
Method Details
-
getIndex
int getIndex()Returns the array offset which this handler intends to assign or a negative value if this handler intends to assign a scalar value.- Returns:
- The array offset which this handler intends to assign or a negative value if this handler intends to assign a scalar value.
-
resolve
StackManipulation resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, TypeDescription type, StackManipulation value) Resolves this handler.- Parameters:
instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.assigner- The assigner to use.argumentHandler- The argument handler for the handled advice method.type- The type that this handler receives for assignment.value- An instruction to load the handled value onto the operand stack.- Returns:
- The stack manipulation resolved by this handler.
-