Package: org.apache.groovy.contracts.generation

## [Java] Class OldVariableGenerationUtility

- org.apache.groovy.contracts.generation.OldVariableGenerationUtility

-     public class OldVariableGenerationUtility
      extends Object

  Central place where code generation for the `old` closure variable takes place.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `OLD_VARIABLES_METHOD` |

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static void` | `addOldVariableMethodNode(ClassNode classNode)` Creates a synthetic method handling generation of the `old` variable map.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll`

- - ### Field Detail

    - #### public static final String OLD_VARIABLES_METHOD

  - ### Method Detail

    - #### public static void addOldVariableMethodNode(ClassNode classNode)

      Creates a synthetic method handling generation of the `old` variable map. If a super class declares the same synthetic method it will be called and the results will be merged.

      Parameters:
        `classNode` - which contains postconditions, so an old variable generating method makes sense here.