|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.Datatypes
public class Datatypes
This class is a facade to the data type services.
Field Summary | |
---|---|
static BooleanType |
BOOLEAN
|
static ArrayType |
BOOLEAN_ARRAY
|
static ByteType |
BYTE
|
static ArrayType |
BYTE_ARRAY
|
static DataTypeRepository |
datatypeRepository
|
static DoubleType |
DOUBLE
|
static ArrayType |
DOUBLE_ARRAY
|
static FloatType |
FLOAT
|
static ArrayType |
FLOAT_ARRAY
|
static IntegerType |
INTEGER
|
static ArrayType |
INTEGER_ARRAY
|
static LongType |
LONG
|
static ArrayType |
LONG_ARRAY
|
static StringType |
STRING
|
static VariantType |
VARIANT
|
Constructor Summary | |
---|---|
Datatypes()
|
Method Summary | ||
---|---|---|
static void |
addDatatype(java.lang.String name,
Datatype type)
Adds a type to the repository. |
|
static void |
addDefinitions(java.lang.String definitions)
Parses and adds type definitions to the repository. |
|
static
|
getDatatype(java.lang.Class<?> clazz)
Read representation from a class. |
|
static Datatype |
getDatatype(java.lang.String name)
Get data type by name. |
|
static
|
getDatatypeUnchecked(java.lang.Class<?> clazz)
Read representation from a class. |
|
static Datatype |
translate(java.lang.String typeString)
Parses an unnamed data type. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final BooleanType BOOLEAN
public static final ByteType BYTE
public static final IntegerType INTEGER
public static final LongType LONG
public static final FloatType FLOAT
public static final DoubleType DOUBLE
public static final StringType STRING
public static final VariantType VARIANT
public static final ArrayType BOOLEAN_ARRAY
public static final ArrayType BYTE_ARRAY
public static final ArrayType INTEGER_ARRAY
public static final ArrayType LONG_ARRAY
public static final ArrayType FLOAT_ARRAY
public static final ArrayType DOUBLE_ARRAY
public static final DataTypeRepository datatypeRepository
Constructor Detail |
---|
public Datatypes()
Method Detail |
---|
public static <T extends Datatype> T getDatatype(java.lang.Class<?> clazz) throws DatatypeConstructionException
As an exception, in the subclasses of Throwable
, the fields of
Throwable are omited.
clazz
-
DatatypeConstructionException
ReflectionBindingFactory
public static <T extends Datatype> T getDatatypeUnchecked(java.lang.Class<?> clazz) throws RuntimeDatatypeConstructionException
This method is used when the caller is 100% sure that binding will be constructed without exceptions. Such classes are all primitive types (Double, Integer, etc, arrays, DataType, ...) This method is unchecked if binding construction to the clazz cannot be trusted. If construction fails, a RuntimeException is thrown.
clazz
-
RuntimeDatatypeConstructionException
ReflectionBindingFactory
public static void addDatatype(java.lang.String name, Datatype type)
name
- Name of the typetype
- Type to be addedpublic static Datatype getDatatype(java.lang.String name)
name
-
public static void addDefinitions(java.lang.String definitions) throws DataTypeSyntaxError
definitions
- Definitions in textual format.
DataTypeSyntaxError
public static Datatype translate(java.lang.String typeString) throws DataTypeSyntaxError
typeString
- The textual representation of the type to be translated
DataTypeSyntaxError
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |