Enum Class JsonCreator.Mode

java.lang.Object
java.lang.Enum<JsonCreator.Mode>
cloud.opencode.base.json.annotation.JsonCreator.Mode
All Implemented Interfaces:
Serializable, Comparable<JsonCreator.Mode>, Constable
Enclosing class:
JsonCreator

public static enum JsonCreator.Mode extends Enum<JsonCreator.Mode>
Creator mode that defines how arguments are bound. 创建器模式,定义参数的绑定方式。
Since:
JDK 25, opencode-base-json V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • DEFAULT

      public static final JsonCreator.Mode DEFAULT
      Auto-detect the creator mode based on context. 根据上下文自动检测创建器模式。
    • DELEGATING

      public static final JsonCreator.Mode DELEGATING
      Single-argument creator where the argument represents the entire JSON value. 单参数创建器,参数表示整个 JSON 值。
    • PROPERTIES

      public static final JsonCreator.Mode PROPERTIES
      Multi-argument creator where each argument corresponds to a JSON property. Use with JsonProperty on parameters to specify property names. 多参数创建器,每个参数对应一个 JSON 属性。 与参数上的 JsonProperty 配合使用以指定属性名。
    • DISABLED

      public static final JsonCreator.Mode DISABLED
      Explicitly disable this creator. 显式禁用此创建器。
  • Method Details

    • values

      public static JsonCreator.Mode[] 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

      public static JsonCreator.Mode valueOf(String name)
      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 name
      NullPointerException - if the argument is null