Enum LogicalType
- java.lang.Object
-
- java.lang.Enum<LogicalType>
-
- com.fasterxml.jackson.databind.type.LogicalType
-
- All Implemented Interfaces:
Serializable,Comparable<LogicalType>
public enum LogicalType extends Enum<LogicalType>
Set of logical types (or type categories, classes of classes), used for defining applicability of configuration like coercion configuration. Used instead to allow easier targeting of types than having to enumerate physical types (ClassorJavaType).- Since:
- 2.12
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ArrayArray types of other values.BinaryBinary data such asbyte[]andByteBuffer.BooleanCollectionCollectionvalues (and "Collection-like" for JVM languages and datatype libraries with semantically similar types)DateTimeEnumVariousEnumtypes.FloatIntegerMapMapvalues (and "Map-like" for JVM languages and datatype libraries with semantically similar types)OtherScalarPOJOTypes that are handled by default "set of key/value pairs" serialization, also known as "Beans".TextualPurely textual types,Stringand similar (but not types that are generally expressed as Strings in input).Untyped"Non-type", Type used to contained untyped, free-form content: maybe a "Tree" (sometimes called "AST"), or buffer of some kind, or even just nominal type ofObject
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LogicalTypefromClass(Class<?> raw, LogicalType defaultIfNotRecognized)Helper method to use for figuring out logical type from physical type, in cases where caller wants a guess.static LogicalTypevalueOf(String name)Returns the enum constant of this type with the specified name.static LogicalType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
Array
public static final LogicalType Array
Array types of other values.Note: excludes binary type
byte[].
-
Collection
public static final LogicalType Collection
Collectionvalues (and "Collection-like" for JVM languages and datatype libraries with semantically similar types)
-
Map
public static final LogicalType Map
Mapvalues (and "Map-like" for JVM languages and datatype libraries with semantically similar types)
-
POJO
public static final LogicalType POJO
Types that are handled by default "set of key/value pairs" serialization, also known as "Beans".In addition to user-defined types, also includes JDK types like:
-
Untyped
public static final LogicalType Untyped
"Non-type", Type used to contained untyped, free-form content: maybe a "Tree" (sometimes called "AST"), or buffer of some kind, or even just nominal type ofObject
-
Integer
public static final LogicalType Integer
-
Float
public static final LogicalType Float
-
Boolean
public static final LogicalType Boolean
-
Enum
public static final LogicalType Enum
VariousEnumtypes.
-
Textual
public static final LogicalType Textual
Purely textual types,Stringand similar (but not types that are generally expressed as Strings in input).
-
Binary
public static final LogicalType Binary
Binary data such asbyte[]andByteBuffer.
-
DateTime
public static final LogicalType DateTime
-
OtherScalar
public static final LogicalType OtherScalar
-
-
Method Detail
-
values
public static LogicalType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LogicalType c : LogicalType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LogicalType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
fromClass
public static LogicalType fromClass(Class<?> raw, LogicalType defaultIfNotRecognized)
Helper method to use for figuring out logical type from physical type, in cases where caller wants a guess. Note that introspection is not exhaustive and mostly covers basicCollection,MapandEnumcases; but not more specific types (for example datatype-provided extension types).- Parameters:
raw- Type-erased class to classifydefaultIfNotRecognized- if no type recognized, value to return (for example,null)
-
-