|
|||||||||
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 DataTypeRepository |
datatypeRepository
|
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 DataType |
getDataType(java.lang.Class<?> clazz)
Read representation from a class. |
static DataType |
getDataType(java.lang.String name)
Get data type by name. |
static DataType |
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 DataTypeRepository datatypeRepository
Constructor Detail |
---|
public DataTypes()
Method Detail |
---|
public static DataType getDataType(java.lang.Class<?> clazz) throws DataTypeConstructionException
As an exception, in the subclasses of Throwable
, the fields of
Throwable are omited.
clazz
-
DataTypeConstructionException
ReflectionBinding
public static DataType 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
ReflectionBinding
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 |