Enum Class JsonTypeInfo.Id

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

public static enum JsonTypeInfo.Id extends Enum<JsonTypeInfo.Id>
Type identifier mechanism 类型标识机制
Since:
JDK 25, opencode-base-json V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • CLASS

      public static final JsonTypeInfo.Id CLASS
      Fully qualified Java class name. 完全限定的 Java 类名。
    • MINIMAL_CLASS

      public static final JsonTypeInfo.Id MINIMAL_CLASS
      Minimal class name (without common package prefix). 最小类名(不含公共包前缀)。
    • NAME

      public static final JsonTypeInfo.Id NAME
      Logical type name (must be defined via JsonTypeName or JsonSubTypes.Type). 逻辑类型名(须通过 JsonTypeNameJsonSubTypes.Type 定义)。
    • CUSTOM

      public static final JsonTypeInfo.Id CUSTOM
      Custom type identifier resolved by application-specific logic. 由应用程序特定逻辑解析的自定义类型标识。
  • Method Details

    • values

      public static JsonTypeInfo.Id[] 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 JsonTypeInfo.Id 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