Enum Class JavaTypeToJsonSchemaMapper
java.lang.Object
java.lang.Enum<JavaTypeToJsonSchemaMapper>
com.github.codeboyzhou.mcp.declarative.enums.JavaTypeToJsonSchemaMapper
- 所有已实现的接口:
Serializable,Comparable<JavaTypeToJsonSchemaMapper>,Constable
This enum is used to map Java types to JSON schema data types.
- 作者:
- codeboyzhou
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明Javabooleanis mapped to JSON schema data typeboolean.JavaBooleanis mapped to JSON schema data typeboolean.Javadoubleis mapped to JSON schema data typenumber.JavaDoubleis mapped to JSON schema data typenumber.Javafloatis mapped to JSON schema data typenumber.JavaFloatis mapped to JSON schema data typenumber.Javaintis mapped to JSON schema data typeinteger.JavaIntegeris mapped to JSON schema data typeinteger.Javalongis mapped to JSON schema data typenumber.JavaLongis mapped to JSON schema data typenumber.JavaNumberis mapped to JSON schema data typenumber.JavaObjectis mapped to JSON schema data typeobject.JavaStringis mapped to JSON schema data typestring. -
方法概要
修饰符和类型方法说明Returns the JSON schema data type.static StringgetJsonSchemaType(Class<?> javaType) Returns the JSON schema data type for the specified Java class.static JavaTypeToJsonSchemaMapperReturns the enum constant of this class with the specified name.static JavaTypeToJsonSchemaMapper[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
STRING
JavaStringis mapped to JSON schema data typestring. -
NUMBER
JavaNumberis mapped to JSON schema data typenumber. -
LONG
Javalongis mapped to JSON schema data typenumber. -
LONG_CLASS
JavaLongis mapped to JSON schema data typenumber. -
FLOAT
Javafloatis mapped to JSON schema data typenumber. -
FLOAT_CLASS
JavaFloatis mapped to JSON schema data typenumber. -
DOUBLE
Javadoubleis mapped to JSON schema data typenumber. -
DOUBLE_CLASS
JavaDoubleis mapped to JSON schema data typenumber. -
INT
Javaintis mapped to JSON schema data typeinteger. -
INTEGER
JavaIntegeris mapped to JSON schema data typeinteger. -
BOOLEAN
Javabooleanis mapped to JSON schema data typeboolean. -
BOOLEAN_CLASS
JavaBooleanis mapped to JSON schema data typeboolean. -
OBJECT
JavaObjectis mapped to JSON schema data typeobject.
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- 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.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
getJsonSchemaType
Returns the JSON schema data type.- 返回:
- the JSON schema data type
-
getJsonSchemaType
Returns the JSON schema data type for the specified Java class. If the Java class is not supported or mapped to a JSON schema data type,"string"will be returned.- 参数:
javaType- the Java class- 返回:
- the JSON schema data type
-