Enum Class JsonTypeInfo.As
- All Implemented Interfaces:
Serializable, Comparable<JsonTypeInfo.As>, Constable
- Enclosing class:
JsonTypeInfo
Type information inclusion strategy
类型信息包含策略
- 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 ConstantDescriptionType info uses an existing property already present in the object.Type info is included as a separate sibling property outside the object.Type info is included as a JSON property of the object.Type info wraps the object in a two-element JSON array.Type info wraps the object in a single-entry JSON object. -
Method Summary
Modifier and TypeMethodDescriptionstatic JsonTypeInfo.AsReturns the enum constant of this class with the specified name.static JsonTypeInfo.As[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PROPERTY
Type info is included as a JSON property of the object. 类型信息作为对象的 JSON 属性包含。 -
WRAPPER_OBJECT
Type info wraps the object in a single-entry JSON object. 类型信息将对象包装在单条目 JSON 对象中。 -
WRAPPER_ARRAY
Type info wraps the object in a two-element JSON array. 类型信息将对象包装在双元素 JSON 数组中。 -
EXISTING_PROPERTY
Type info uses an existing property already present in the object. 类型信息使用对象中已存在的属性。 -
EXTERNAL_PROPERTY
Type info is included as a separate sibling property outside the object. 类型信息作为对象外部的单独兄弟属性包含。
-
-
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
-