public final class Types extends Object
| Modifier and Type | Field and Description |
|---|---|
static BooleanType |
BOOLEAN
Boolean type.
|
static ArrayType<Boolean> |
BOOLEAN_ARRAY
Array of
BOOLEAN |
static DateType |
DATE
Date type.
|
static ArrayType<org.joda.time.LocalDate> |
DATE_ARRAY
Array of
DATE |
static DateTimeType |
DATETIME
DateTime type.
|
static ArrayType<org.joda.time.LocalDateTime> |
DATETIME_ARRAY
Array of
DATETIME |
static FileType |
FILE
Custom file type.
|
static ArrayType<ComponentFile> |
FILE_ARRAY
Array of
FILE |
static FloatType |
FLOAT
Float type.
|
static ArrayType<Double> |
FLOAT_ARRAY
Array of
FLOAT |
static FunctionType |
FUNCTION
Function type.
|
static ArrayType<FunctionCall> |
FUNCTION_ARRAY
Array of
FUNCTION |
static IntegerType |
INTEGER
Integer type.
|
static ArrayType<Long> |
INTEGER_ARRAY
Array of
INTEGER |
static StringType |
STRING
String type.
|
static ArrayType<String> |
STRING_ARRAY
Array of
STRING |
static TableStoreType |
TABLE_STORE
Table store type.
|
static VariableType |
VARIABLE
Variable type.
|
static ArrayType<Variable> |
VARIABLE_ARRAY
Array of
VARIABLE |
| Constructor and Description |
|---|
Types() |
| Modifier and Type | Method and Description |
|---|---|
static ArrayType<?> |
arrayOf(Type<?> type)
Returns array type with elements of given type.
|
static Type<?> |
get(String name)
Returns type with given name.
|
static boolean |
isArray(Type<?> type)
Returns true if given type is an array
|
static Type<?> |
typeOf(Class<?> clazz)
Returns type (one defined in
Types) that represents given class instances. |
static <T> Type<T> |
typeOf(T instance)
Returns type (one defined in
Types) that represents given object. |
public static final StringType STRING
StringTypepublic static final BooleanType BOOLEAN
BooleanTypepublic static final IntegerType INTEGER
IntegerTypepublic static final FloatType FLOAT
FloatTypepublic static final DateType DATE
DateTypepublic static final DateTimeType DATETIME
DateTimeTypepublic static final VariableType VARIABLE
VariableTypepublic static final FunctionType FUNCTION
FunctionTypepublic static final TableStoreType TABLE_STORE
TableStoreTypepublic static final FileType FILE
FileTypepublic static final ArrayType<org.joda.time.LocalDateTime> DATETIME_ARRAY
DATETIMEpublic static final ArrayType<FunctionCall> FUNCTION_ARRAY
FUNCTIONpublic static final ArrayType<ComponentFile> FILE_ARRAY
FILEpublic static Type<?> get(String name)
IllegalArgumentException if there is not type
with such name.name - type namepublic static <T> Type<T> typeOf(T instance)
Types) that represents given object. Throws
IllegalArgumentException if there is no such mapping.instance - instancepublic static Type<?> typeOf(Class<?> clazz)
Types) that represents given class instances. Throws
IllegalArgumentException if there is no such mapping.clazz - classpublic static ArrayType<?> arrayOf(Type<?> type)
type - elements typepublic static boolean isArray(Type<?> type)
type - typeCopyright © 2024 Suncode. All rights reserved.