Package org.apache.groovy.contracts.generation

# Class Configurator

java.lang.Object
org.apache.groovy.contracts.generation.Configurator

public final class Configurator extends Object

Handles `-ea` and `-da` runtime input arguments for enabling and disabling contract elements.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `DISABLE_PACKAGE_ASSERTIONS`
  JVM argument prefix that disables assertions for a package or class.
  `static final String`
  `DISABLED_ASSERTIONS`
  JVM argument prefix that disables assertions.
  `static final String`
  `ENABLE_PACKAGE_ASSERTIONS`
  JVM argument prefix that enables assertions for a package or class.
  `static final String`
  `ENABLED_ASSERTIONS`
  JVM argument prefix that enables assertions.
  `static final String`
  `PACKAGE_POSTFIX`
  Suffix used by the JVM to denote package-wide assertion configuration.
  `static final String`
  `PACKAGE_PREFIX`
  Separator between assertion flags and package or class names.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Configurator()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static boolean`
  `checkAssertionsEnabled(String className)`
  This static method is used within generated code to check whether assertions have been disabled for the current class or not.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DISABLED_ASSERTIONS

    public static final String DISABLED_ASSERTIONS
    JVM argument prefix that disables assertions.
    See Also:
      - Constant Field Values

  - ### ENABLED_ASSERTIONS

    public static final String ENABLED_ASSERTIONS
    JVM argument prefix that enables assertions.
    See Also:
      - Constant Field Values

  - ### PACKAGE_PREFIX

    public static final String PACKAGE_PREFIX
    Separator between assertion flags and package or class names.
    See Also:
      - Constant Field Values

  - ### ENABLE_PACKAGE_ASSERTIONS

    public static final String ENABLE_PACKAGE_ASSERTIONS
    JVM argument prefix that enables assertions for a package or class.
    See Also:
      - Constant Field Values

  - ### DISABLE_PACKAGE_ASSERTIONS

    public static final String DISABLE_PACKAGE_ASSERTIONS
    JVM argument prefix that disables assertions for a package or class.
    See Also:
      - Constant Field Values

  - ### PACKAGE_POSTFIX

    public static final String PACKAGE_POSTFIX
    Suffix used by the JVM to denote package-wide assertion configuration.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Configurator

    public Configurator()

- ## Method Details

  - ### checkAssertionsEnabled

    public static boolean checkAssertionsEnabled(String className)
    This static method is used within generated code to check whether assertions have been disabled for the current class or not.
    Parameters:
      `className` - the class name to look up in the assertion configuration
    Returns:
      whether assertion checking is enabled or not