Enum Class JsonNaming.Strategy
- All Implemented Interfaces:
Serializable, Comparable<JsonNaming.Strategy>, Constable
- Enclosing class:
JsonNaming
Naming strategy enumeration
命名策略枚举
- Since:
- JDK 25, opencode-base-json V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionConvert to dot.case notation.Use field names as-is (identity).Convert camelCase to kebab-case.Convert to lowercase.Convert camelCase to PascalCase.Convert camelCase to snake_case.Convert camelCase to UPPER_SNAKE_CASE. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonNaming.StrategyReturns the enum constant of this class with the specified name.static JsonNaming.Strategy[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
IDENTITY
Use field names as-is (identity). 按原样使用字段名(恒等映射)。Example: userName -> userName
-
SNAKE_CASE
Convert camelCase to snake_case. 将驼峰式转换为蛇形命名。Example: userName -> user_name
-
UPPER_SNAKE_CASE
Convert camelCase to UPPER_SNAKE_CASE. 将驼峰式转换为大写蛇形命名。Example: userName -> USER_NAME
-
KEBAB_CASE
Convert camelCase to kebab-case. 将驼峰式转换为短横线命名。Example: userName -> user-name
-
PASCAL_CASE
Convert camelCase to PascalCase. 将驼峰式转换为帕斯卡命名。Example: userName -> UserName
-
LOWER_CASE
Convert to lowercase. 转换为小写。Example: userName -> username
-
DOT_CASE
Convert to dot.case notation. 转换为点号分隔命名。Example: userName -> user.name
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-