@groovy.transform.CompileStatic @SuppressWarnings(value: UnnecessaryCollectCall) enum CaseFormats
Simple case formats.
| Enum constant | Description |
|---|---|
KEBAB_CASE |
Hyphenated variable naming convention, e.g., "lower-hyphen". |
LOWER_CAMEL |
Java variable naming convention, e.g., "lowerCamel". |
LOWER_DOTTED |
Dotted as in Gradle and system properties. |
SCREAMING_KEBAB_CASE |
"upper-hyphen". |
SCREAMING_SNAKE_CASE |
Java and C++ constant naming convention, e.g., "UPPER_UNDERSCORE". |
SNAKE_CASE |
C++ variable naming convention, e.g., "lower_underscore". |
UPPER_CAMEL |
Java and C++ class naming convention, e.g., "UpperCamel". |
| Modifiers | Name | Description |
|---|---|---|
static CaseFormats |
MAX_VALUE |
|
static CaseFormats |
MIN_VALUE |
| Type Params | Return Type | Name and description |
|---|---|---|
|
String |
addParts(Iterable<String> parts)Adds a set of input parts together using a specific formatter. |
|
String |
convertTo(CaseFormats format, String input)Converts an input which is in this format to another format |
|
String |
convertWithoutCaseCorrection(CaseFormats format, String input)Converts an input which is in this format to another format. |
|
CaseFormats |
next() |
|
CaseFormats |
previous() |
|
static CaseFormats |
valueOf(String name) |
|
static final CaseFormats[] |
values() |
Hyphenated variable naming convention, e.g., "lower-hyphen".
Java variable naming convention, e.g., "lowerCamel".
Dotted as in Gradle and system properties.
"upper-hyphen".
Java and C++ constant naming convention, e.g., "UPPER_UNDERSCORE". Also environment variables.
C++ variable naming convention, e.g., "lower_underscore".
Java and C++ class naming convention, e.g., "UpperCamel".
Adds a set of input parts together using a specific formatter.
parts - Input partsConverts an input which is in this format to another format
format - Format to convert to.input - Input stringConverts an input which is in this format to another format. Does not perform case correction on the input.
format - Format to convert to.input - Input stringGroovy Documentation