Class MethodCall.TerminationHandler.FieldSetting

    • Field Detail

      • fieldDescription

        private final FieldDescription fieldDescription
        The field to set.
    • Constructor Detail

      • FieldSetting

        protected FieldSetting​(FieldDescription fieldDescription)
        Creates a new field-setting termination handler.
        Parameters:
        fieldDescription - The field to set.
    • Method Detail

      • toStackManipulation

        public StackManipulation toStackManipulation​(MethodDescription invokedMethod,
                                                     MethodDescription instrumentedMethod,
                                                     Assigner assigner,
                                                     Assigner.Typing typing)
        Returns a stack manipulation that handles the method return.
        Specified by:
        toStackManipulation in interface MethodCall.TerminationHandler
        Parameters:
        invokedMethod - 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.
        Returns:
        A stack manipulation that handles the method return.