Enum Class JsonCreator.Mode
- All Implemented Interfaces:
Serializable, Comparable<JsonCreator.Mode>, Constable
- Enclosing class:
JsonCreator
Creator mode that defines how arguments are bound.
创建器模式,定义参数的绑定方式。
- 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 ConstantDescriptionAuto-detect the creator mode based on context.Single-argument creator where the argument represents the entire JSON value.Explicitly disable this creator.Multi-argument creator where each argument corresponds to a JSON property. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonCreator.ModeReturns the enum constant of this class with the specified name.static JsonCreator.Mode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Auto-detect the creator mode based on context. 根据上下文自动检测创建器模式。 -
DELEGATING
Single-argument creator where the argument represents the entire JSON value. 单参数创建器,参数表示整个 JSON 值。 -
PROPERTIES
Multi-argument creator where each argument corresponds to a JSON property. Use withJsonPropertyon parameters to specify property names. 多参数创建器,每个参数对应一个 JSON 属性。 与参数上的JsonProperty配合使用以指定属性名。 -
DISABLED
Explicitly disable this creator. 显式禁用此创建器。
-
-
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
-