org.simantics.databoard.parser.unparsing
Class DataTypeToAst

java.lang.Object
  extended by org.simantics.databoard.parser.unparsing.DataTypeToAst
All Implemented Interfaces:
Datatype.Visitor<AstType>

public class DataTypeToAst
extends java.lang.Object
implements Datatype.Visitor<AstType>

Converts data type to abstract syntax tree.

Author:
Hannu Niemistö

Constructor Summary
DataTypeToAst(DataTypeRepository repo)
           
 
Method Summary
 AstType addDefinition(java.lang.String name, Datatype type)
           
 java.util.List<AstTypeDefinition> getTypeDefinitions()
           
 AstType visit(ArrayType b)
           
 AstType visit(BooleanType b)
           
 AstType visit(ByteType b)
           
 AstType visit(Datatype type)
           
 AstType visit(DoubleType b)
           
 AstType visit(FloatType b)
           
 AstType visit(IntegerType b)
           
 AstType visit(LongType b)
           
 AstType visit(MapType b)
           
 AstType visit(OptionalType b)
           
 AstType visit(RecordType b)
           
 AstType visit(StringType b)
           
 AstType visit(UnionType b)
           
 AstType visit(VariantType b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTypeToAst

public DataTypeToAst(DataTypeRepository repo)
Method Detail

addDefinition

public AstType addDefinition(java.lang.String name,
                             Datatype type)

visit

public AstType visit(Datatype type)

visit

public AstType visit(ArrayType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(BooleanType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(DoubleType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(FloatType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(IntegerType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(ByteType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(LongType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(OptionalType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(RecordType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(StringType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(UnionType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

visit

public AstType visit(VariantType b)
Specified by:
visit in interface Datatype.Visitor<AstType>

getTypeDefinitions

public java.util.List<AstTypeDefinition> getTypeDefinitions()

visit

public AstType visit(MapType b)
Specified by:
visit in interface Datatype.Visitor<AstType>