|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.shiwa.fgi.iwir.DataType
public abstract class DataType
The Class DataType represents a data type. A DataType object is either an
instance of a SimpleType
object or CollectionType
object.
Data types can be defined either by constructors, for example new
CollectionType(SimpleType.STRING), or by a string, for example
DataType.fromString("collection/string").
The toString() method returns the string representation of the data
type.
Simple type is a wrapper and contains a enum concrete type. To get the real
type use SimpleType.getType()
.
To get the nested type of a collection use CollectionType.getType()
.
Constructor Summary | |
---|---|
DataType()
|
Method Summary | |
---|---|
static DataType |
fromString(java.lang.String s)
Returns a datatype object from a given string. |
SimpleType.ConcreteType |
getConcreteType()
Returns the enum rather the wrappe as in getSimpleType()
. |
int |
getNestingLevel()
Gets the nesting level of a type. |
SimpleType |
getSimpleType()
Gets the simple type of a data type. |
java.lang.String |
toString()
Returns the string representation of the data type instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DataType()
Method Detail |
---|
public static DataType fromString(java.lang.String s) throws java.lang.IllegalArgumentException
s
- the string to parse
java.lang.IllegalArgumentException
- if the string can not be parsedpublic SimpleType getSimpleType()
public SimpleType.ConcreteType getConcreteType()
getSimpleType()
.
public int getNestingLevel()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |