com.veromodo.tempo.sem.type
Class PrettyPrintType

java.lang.Object
  extended by com.veromodo.tempo.sem.type.TypeVisitor
      extended by com.veromodo.tempo.sem.type.PrettyPrintType

public class PrettyPrintType
extends TypeVisitor

a type visitor producing a output friendly string representation of a type

Author:
Carleton

Constructor Summary
PrettyPrintType()
           
PrettyPrintType(java.lang.StringBuffer sbuf)
           
 
Method Summary
 void addPrint(Type ty)
           
 void applyTypeAugmentedReal(TypeAugmentedReal n)
           
 void applyTypeAutomaton(TypeAutomaton n)
           
 void applyTypeBasicAutomaton(TypeBasicAutomaton n)
           
 void applyTypeBool(TypeBool n)
           
 void applyTypeChar(TypeChar n)
           
 void applyTypeCompositeAutomaton(TypeCompositeAutomaton n)
           
 void applyTypeConstructor(TypeConstructor n)
           
 void applyTypeDiscreteReal(TypeDiscreteReal n)
           
 void applyTypeEnum(TypeEnum n)
           
 void applyTypeEnumValue(TypeEnumValue n)
           
 void applyTypeError(TypeError n)
           
 void applyTypeFloat(TypeFloat n)
           
 void applyTypeFunction(TypeFunction n)
           
 void applyTypeFunctional(TypeFunctional n)
           
 void applyTypeFunctionalGeneric(TypeFunctionalGeneric n)
           
 void applyTypeGeneric(TypeGeneric n)
           
 void applyTypeId(TypeId n)
           
 void applyTypeIndexed(TypeIndexed n)
           
 void applyTypeInstance(TypeInstance n)
           
 void applyTypeInt(TypeInt n)
           
 void applyTypeInt32(TypeInt32 n)
           
 void applyTypeList(TypeList n)
           
 void applyTypeMap(TypeMap n)
           
 void applyTypeMatrix(TypeArray n)
           
 void applyTypeMeta(TypeMeta n)
           
 void applyTypeNat(TypeNat n)
           
 void applyTypeParameter(TypeParameter n)
           
 void applyTypeReal(TypeReal n)
           
 void applyTypeSum(TypeSum n)
           
 void applyTypeTuple(TypeTuple n)
           
 void applyTypeVariable(TypeVariable n)
           
 void applyTypeVoid(TypeVoid n)
           
 java.lang.String prettyPrint(Type ty)
          Produces an output friendly string translation of a type.
 
Methods inherited from class com.veromodo.tempo.sem.type.TypeVisitor
doIt
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrettyPrintType

public PrettyPrintType()

PrettyPrintType

public PrettyPrintType(java.lang.StringBuffer sbuf)
Method Detail

prettyPrint

public java.lang.String prettyPrint(Type ty)
Produces an output friendly string translation of a type. The toString() method on types often reveals more information about a type than a user needs and can often be hard to read. This visitor produces an alternate printing which is user and output friendly.

Parameters:
ty - to be printed
Returns:
the string translation of given type

addPrint

public void addPrint(Type ty)

applyTypeNat

public void applyTypeNat(TypeNat n)
Overrides:
applyTypeNat in class TypeVisitor

applyTypeBool

public void applyTypeBool(TypeBool n)
Overrides:
applyTypeBool in class TypeVisitor

applyTypeError

public void applyTypeError(TypeError n)
Overrides:
applyTypeError in class TypeVisitor

applyTypeFloat

public void applyTypeFloat(TypeFloat n)
Overrides:
applyTypeFloat in class TypeVisitor

applyTypeDiscreteReal

public void applyTypeDiscreteReal(TypeDiscreteReal n)
Overrides:
applyTypeDiscreteReal in class TypeVisitor

applyTypeId

public void applyTypeId(TypeId n)
Overrides:
applyTypeId in class TypeVisitor

applyTypeInt

public void applyTypeInt(TypeInt n)
Overrides:
applyTypeInt in class TypeVisitor

applyTypeInt32

public void applyTypeInt32(TypeInt32 n)
Overrides:
applyTypeInt32 in class TypeVisitor

applyTypeVoid

public void applyTypeVoid(TypeVoid n)
Overrides:
applyTypeVoid in class TypeVisitor

applyTypeReal

public void applyTypeReal(TypeReal n)
Overrides:
applyTypeReal in class TypeVisitor

applyTypeAugmentedReal

public void applyTypeAugmentedReal(TypeAugmentedReal n)
Overrides:
applyTypeAugmentedReal in class TypeVisitor

applyTypeChar

public void applyTypeChar(TypeChar n)
Overrides:
applyTypeChar in class TypeVisitor

applyTypeVariable

public void applyTypeVariable(TypeVariable n)
Overrides:
applyTypeVariable in class TypeVisitor

applyTypeBasicAutomaton

public void applyTypeBasicAutomaton(TypeBasicAutomaton n)
Overrides:
applyTypeBasicAutomaton in class TypeVisitor

applyTypeCompositeAutomaton

public void applyTypeCompositeAutomaton(TypeCompositeAutomaton n)
Overrides:
applyTypeCompositeAutomaton in class TypeVisitor

applyTypeInstance

public void applyTypeInstance(TypeInstance n)
Overrides:
applyTypeInstance in class TypeVisitor

applyTypeMeta

public void applyTypeMeta(TypeMeta n)
Overrides:
applyTypeMeta in class TypeVisitor

applyTypeEnum

public void applyTypeEnum(TypeEnum n)
Overrides:
applyTypeEnum in class TypeVisitor

applyTypeEnumValue

public void applyTypeEnumValue(TypeEnumValue n)
Overrides:
applyTypeEnumValue in class TypeVisitor

applyTypeTuple

public void applyTypeTuple(TypeTuple n)
Overrides:
applyTypeTuple in class TypeVisitor

applyTypeSum

public void applyTypeSum(TypeSum n)
Overrides:
applyTypeSum in class TypeVisitor

applyTypeParameter

public void applyTypeParameter(TypeParameter n)
Overrides:
applyTypeParameter in class TypeVisitor

applyTypeGeneric

public void applyTypeGeneric(TypeGeneric n)
Overrides:
applyTypeGeneric in class TypeVisitor

applyTypeFunctionalGeneric

public void applyTypeFunctionalGeneric(TypeFunctionalGeneric n)
Overrides:
applyTypeFunctionalGeneric in class TypeVisitor

applyTypeMatrix

public void applyTypeMatrix(TypeArray n)
Overrides:
applyTypeMatrix in class TypeVisitor

applyTypeMap

public void applyTypeMap(TypeMap n)
Overrides:
applyTypeMap in class TypeVisitor

applyTypeConstructor

public void applyTypeConstructor(TypeConstructor n)
Overrides:
applyTypeConstructor in class TypeVisitor

applyTypeFunction

public void applyTypeFunction(TypeFunction n)
Overrides:
applyTypeFunction in class TypeVisitor

applyTypeAutomaton

public void applyTypeAutomaton(TypeAutomaton n)
Overrides:
applyTypeAutomaton in class TypeVisitor

applyTypeFunctional

public void applyTypeFunctional(TypeFunctional n)
Overrides:
applyTypeFunctional in class TypeVisitor

applyTypeIndexed

public void applyTypeIndexed(TypeIndexed n)
Overrides:
applyTypeIndexed in class TypeVisitor

applyTypeList

public void applyTypeList(TypeList n)
Overrides:
applyTypeList in class TypeVisitor