public static class MethodCall.TargetHandler.ForField extends Object implements MethodCall.TargetHandler
MethodCall.TargetHandler.ForConstructingInvocation, MethodCall.TargetHandler.ForField, MethodCall.TargetHandler.ForMethodParameter, MethodCall.TargetHandler.ForSelfOrStaticInvocation, MethodCall.TargetHandler.ForValue
Modifier | Constructor and Description |
---|---|
protected |
ForField(String name,
FieldLocator.Factory fieldLocatorFactory)
Creates a new target handler for storing a method invocation target in an
instance field.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
int |
hashCode() |
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
|
StackManipulation |
resolve(MethodDescription invokedMethod,
MethodDescription instrumentedMethod,
TypeDescription instrumentedType,
Assigner assigner,
Assigner.Typing typing)
Creates a stack manipulation that represents the method's invocation.
|
String |
toString() |
protected ForField(String name, FieldLocator.Factory fieldLocatorFactory)
name
- The name of the field.fieldLocatorFactory
- The field locator factory to use.public StackManipulation resolve(MethodDescription invokedMethod, MethodDescription instrumentedMethod, TypeDescription instrumentedType, Assigner assigner, Assigner.Typing typing)
MethodCall.TargetHandler
resolve
in interface MethodCall.TargetHandler
invokedMethod
- The method to be invoked.instrumentedMethod
- The instrumented method.instrumentedType
- The instrumented type. @return A stack manipulation that invokes the method.assigner
- The assigner to use.typing
- The typing to apply.public InstrumentedType prepare(InstrumentedType instrumentedType)
InstrumentedType.Prepareable
prepare
in interface InstrumentedType.Prepareable
instrumentedType
- The instrumented type in its current form.Copyright © 2014–2017. All rights reserved.