@HashCodeAndEqualsPlugin.Enhance public static class Advice.AssignReturned.ToThis.Handler extends Object implements Advice.AssignReturned.Handler
Advice.AssignReturned.ToThis
annotation.Modifier and Type | Class and Description |
---|---|
static class |
Advice.AssignReturned.ToThis.Handler.Factory
A handler factory for the
Advice.AssignReturned.ToThis annotation which assigns an advice method's return value
to the this reference of a non-static method. |
Modifier | Constructor and Description |
---|---|
protected |
Handler(int index,
Assigner.Typing typing,
boolean exit)
A handler for assigning the
this reference. |
Modifier and Type | Method and Description |
---|---|
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.
|
StackManipulation |
resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
Assigner assigner,
Advice.ArgumentHandler argumentHandler,
TypeDescription.Generic type,
StackManipulation value)
Resolves this handler.
|
protected Handler(int index, Assigner.Typing typing, boolean exit)
this
reference.index
- The index in the array that is returned which represents the assigned
value or a negative value if assigning a scalar value.typing
- The typing to apply when assigning the returned value to the targeted value.exit
- true
if this handler is applied on exit advice.public int getIndex()
getIndex
in interface Advice.AssignReturned.Handler
public StackManipulation resolve(TypeDescription instrumentedType, MethodDescription instrumentedMethod, Assigner assigner, Advice.ArgumentHandler argumentHandler, TypeDescription.Generic type, StackManipulation value)
resolve
in interface Advice.AssignReturned.Handler
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.Copyright © 2014–2024. All rights reserved.