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 String
DISABLE_PACKAGE_ASSERTIONS
static String
DISABLED_ASSERTIONS
static String
ENABLE_PACKAGE_ASSERTIONS
static String
ENABLED_ASSERTIONS
static String
PACKAGE_POSTFIX
static String
PACKAGE_PREFIX
-
Constructor Summary
Constructors Constructor Description Configurator()
-
Method Summary
All Methods Static Methods Concrete Methods 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.
-
-
-
Field Detail
-
DISABLED_ASSERTIONS
public static final String DISABLED_ASSERTIONS
- See Also:
- Constant Field Values
-
ENABLED_ASSERTIONS
public static final String ENABLED_ASSERTIONS
- See Also:
- Constant Field Values
-
PACKAGE_PREFIX
public static final String PACKAGE_PREFIX
- See Also:
- Constant Field Values
-
ENABLE_PACKAGE_ASSERTIONS
public static final String ENABLE_PACKAGE_ASSERTIONS
- See Also:
- Constant Field Values
-
DISABLE_PACKAGE_ASSERTIONS
public static final String DISABLE_PACKAGE_ASSERTIONS
- See Also:
- Constant Field Values
-
PACKAGE_POSTFIX
public static final String PACKAGE_POSTFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
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
-
-