On this page
[Java] Class Configurator
- 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
Modifiers | Name | Description |
---|---|---|
static String |
DISABLED_ASSERTIONS |
|
static String |
DISABLE_PACKAGE_ASSERTIONS |
|
static String |
ENABLED_ASSERTIONS |
|
static String |
ENABLE_PACKAGE_ASSERTIONS |
|
static String |
PACKAGE_POSTFIX |
|
static String |
PACKAGE_PREFIX |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
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. |
Inherited Methods Summary
Field Detail
public static final String DISABLED_ASSERTIONS
public static final String DISABLE_PACKAGE_ASSERTIONS
public static final String ENABLED_ASSERTIONS
public static final String ENABLE_PACKAGE_ASSERTIONS
public static final String PACKAGE_POSTFIX
public static final String PACKAGE_PREFIX
Method Detail
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
© 2003-2022 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/4.0.0/html/gapi/org/apache/groovy/contracts/generation/Configurator.html