- All Implemented Interfaces:
Serializable,Comparable<LogicalType>,Constable
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 (
Class or JavaType).- Since:
- 2.12
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionArray types of other values.Binary data such asbyte[]andByteBuffer.Collectionvalues (and "Collection-like" for JVM languages and datatype libraries with semantically similar types)VariousEnumtypes.Mapvalues (and "Map-like" for JVM languages and datatype libraries with semantically similar types)Types that are handled by default "set of key/value pairs" serialization, also known as "Beans".Purely textual types,Stringand similar (but not types that are generally expressed as Strings in input)."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
Modifier and TypeMethodDescriptionstatic 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 LogicalTypeReturns the enum constant of this class with the specified name.static LogicalType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Array
Array types of other values.Note: excludes binary type
byte[]. -
Collection
Collectionvalues (and "Collection-like" for JVM languages and datatype libraries with semantically similar types) -
Map
Mapvalues (and "Map-like" for JVM languages and datatype libraries with semantically similar types) -
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
"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
-
Float
-
Boolean
-
Enum
VariousEnumtypes. -
Textual
Purely textual types,Stringand similar (but not types that are generally expressed as Strings in input). -
Binary
Binary data such asbyte[]andByteBuffer. -
DateTime
-
OtherScalar
-
-
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
-
fromClass
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)
-