@HashCodeAndEqualsPlugin.Enhance public static class MethodCall.TerminationHandler.FieldSetting extends Object implements MethodCall.TerminationHandler
| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
MethodCall.TerminationHandler.FieldSetting.Explicit
A factory for a field-setting termination handler that locates a given field. 
 | 
protected static class  | 
MethodCall.TerminationHandler.FieldSetting.Implicit
A factory for a field-setting termination handler that uses a matcher to locate the target field on the insturmented type. 
 | 
MethodCall.TerminationHandler.Factory, MethodCall.TerminationHandler.FieldSetting, MethodCall.TerminationHandler.Simple| Modifier | Constructor and Description | 
|---|---|
protected  | 
FieldSetting(FieldDescription fieldDescription)
Creates a new field-setting termination handler. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
StackManipulation | 
prepare()
Returns a preparing stack manipulation to apply prior to the method call. 
 | 
StackManipulation | 
toStackManipulation(MethodDescription invokedMethod,
                   MethodDescription instrumentedMethod,
                   Assigner assigner,
                   Assigner.Typing typing)
Returns a stack manipulation that handles the method return. 
 | 
protected FieldSetting(FieldDescription fieldDescription)
fieldDescription - The field to set.public StackManipulation prepare()
prepare in interface MethodCall.TerminationHandlerpublic StackManipulation toStackManipulation(MethodDescription invokedMethod, MethodDescription instrumentedMethod, Assigner assigner, Assigner.Typing typing)
toStackManipulation in interface MethodCall.TerminationHandlerinvokedMethod - The method that was invoked by the method call.instrumentedMethod - The method being intercepted.assigner - The assigner to be used.typing - Indicates if dynamic type castings should be attempted for incompatible assignments.Copyright © 2014–2024. All rights reserved.