@HashCodeAndEqualsPlugin.Enhance public static class Advice.AssignReturned.ToFields.Handler extends Object implements Advice.AssignReturned.Handler
Advice.AssignReturned.ToFields.ToField
annotation.Modifier and Type | Class and Description |
---|---|
static class |
Advice.AssignReturned.ToFields.Handler.Factory
A factory to create a handler for a
Advice.AssignReturned.ToFields annotation. |
Modifier | Constructor and Description |
---|---|
protected |
Handler(int index,
String name,
TypeDescription declaringType,
Assigner.Typing typing)
Creates a new handler for a
Advice.AssignReturned.ToReturned annotation. |
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, String name, TypeDescription declaringType, Assigner.Typing typing)
Advice.AssignReturned.ToReturned
annotation.index
- The index in the array that is returned which represents the assigned value or
a negative value if assigning a scalar value.name
- The accessed field's name or an empty string if the field name should be
inferred from the method's accessor name.declaringType
- The field's declaring type or void
if the type should be found within
the instrumented type's hierarchy.typing
- The typing to apply when assigning the returned value to the targeted value.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.