org.simantics.databoard.parser.unparsing
Class DataTypeToAst
java.lang.Object
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ö
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DataTypeToAst
public DataTypeToAst(DataTypeRepository repo)
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>