BaseGenerator (Groovy 5.0.7)

Package: org.apache.groovy.contracts.generation

## [Java] Class BaseGenerator

- org.apache.groovy.contracts.generation.BaseGenerator

-     public abstract class BaseGenerator
      extends Object

  Base class for groovy-contracts code generators.

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `INVARIANT_CLOSURE_PREFIX` |
    `static String` | `META_DATA_USE_INLINE_MODE` |
    `protected ReaderSource` | `source` |

  - ### Constructor Summary

    Constructors
    Constructor and description
    `protected BaseGenerator(ReaderSource source)`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected BooleanExpression` | `addCallsToSuperMethodNodeAnnotationClosure(ClassNode type, MethodNode methodNode, Class<? extends Annotation> annotationType, BooleanExpression booleanExpression, boolean isPostcondition)`
    `` | `protected BlockStatement` | `getInlineModeBlockStatement(BlockStatement blockStatement)`
    `` | `public static String` | `getInvariantMethodName(ClassNode classNode)` Parameters: `classNode` - the ClassNode used to look up the invariant closure field
    `` | `public static MethodNode` | `getInvariantMethodNode(ClassNode classNode)` Parameters: `classNode` - the ClassNode used to look up the invariant closure field
    `` | `protected BlockStatement` | `wrapAssertionBooleanExpression(ClassNode type, MethodNode methodNode, BooleanExpression classInvariantExpression, String assertionType)`

  - ### Inherited Methods Summary

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

- - ### Field Detail

    - #### public static final String INVARIANT_CLOSURE_PREFIX

    - #### public static final String META_DATA_USE_INLINE_MODE

    - #### protected final ReaderSource source

  - ### Constructor Detail

    - #### protected BaseGenerator(ReaderSource source)

  - ### Method Detail

    - #### protected BooleanExpression addCallsToSuperMethodNodeAnnotationClosure(ClassNode type, MethodNode methodNode, Class<? extends Annotation> annotationType, BooleanExpression booleanExpression, boolean isPostcondition)

    - #### protected BlockStatement getInlineModeBlockStatement(BlockStatement blockStatement)

    - #### public static String getInvariantMethodName(ClassNode classNode)

      Parameters:
        `classNode` - the ClassNode used to look up the invariant closure field
      Returns:
        the field name of the invariant closure field of the given `classNode`

    - #### public static MethodNode getInvariantMethodNode(ClassNode classNode)

      Parameters:
        `classNode` - the ClassNode used to look up the invariant closure field
      Returns:
        the MethodNode which contains the invariant of the given `classNode`

    - #### protected BlockStatement wrapAssertionBooleanExpression(ClassNode type, MethodNode methodNode, BooleanExpression classInvariantExpression, String assertionType)