Enum Class JsonTypeInfo.As

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

public static enum JsonTypeInfo.As extends Enum<JsonTypeInfo.As>
Type information inclusion strategy 类型信息包含策略
Since:
JDK 25, opencode-base-json V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Enum Constant Details

    • PROPERTY

      public static final JsonTypeInfo.As PROPERTY
      Type info is included as a JSON property of the object. 类型信息作为对象的 JSON 属性包含。
    • WRAPPER_OBJECT

      public static final JsonTypeInfo.As WRAPPER_OBJECT
      Type info wraps the object in a single-entry JSON object. 类型信息将对象包装在单条目 JSON 对象中。
    • WRAPPER_ARRAY

      public static final JsonTypeInfo.As WRAPPER_ARRAY
      Type info wraps the object in a two-element JSON array. 类型信息将对象包装在双元素 JSON 数组中。
    • EXISTING_PROPERTY

      public static final JsonTypeInfo.As EXISTING_PROPERTY
      Type info uses an existing property already present in the object. 类型信息使用对象中已存在的属性。
    • EXTERNAL_PROPERTY

      public static final JsonTypeInfo.As EXTERNAL_PROPERTY
      Type info is included as a separate sibling property outside the object. 类型信息作为对象外部的单独兄弟属性包含。
  • Method Details

    • values

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