com.veromodo.tempo.sem.type
Class TypeParameter

java.lang.Object
  extended by com.veromodo.tempo.sem.type.Type
      extended by com.veromodo.tempo.sem.type.TypeParameter
All Implemented Interfaces:
java.lang.Comparable<Type>

public class TypeParameter
extends Type

A type variable within a TypeGeneric. The T in the Seq[T]


Nested Class Summary
 
Nested classes/interfaces inherited from class com.veromodo.tempo.sem.type.Type
Type.Order, Type.TypeKind
 
Field Summary
 
Fields inherited from class com.veromodo.tempo.sem.type.Type
_name, DEFAULT_NAME
 
Constructor Summary
TypeParameter(java.lang.String n)
           
 
Method Summary
 void bind(Type t)
           
 Type.Order compare(Type t)
          Determines how Type t is realted to this.
 TypeParameter downCastParameter()
           
 java.lang.String getName()
           
 boolean is(Type.TypeKind kind)
          Determines if the currently instance is of given TypeKind.
 boolean isBound()
           
 Type resolve()
          Replaces any bound type parameters with thier bound types.
 java.lang.String toString()
           
 void unbind()
           
 void visit(TypeVisitor v)
           
 
Methods inherited from class com.veromodo.tempo.sem.type.Type
accept, acceptable, compareTo, constructedWith, downCastArray, downCastAugmentedReal, downCastAutomaton, downCastBasicAutomaton, downCastBool, downCastChar, downCastCompositeAutomaton, downCastConstructor, downCastDiscreteReal, downCastEnum, downCastEnumValue, downCastFloat, downCastFunction, downCastFunctional, downCastFunctionalGeneric, downCastGeneric, downCastInstance, downCastInt, downCastInt32, downCastList, downCastMap, downCastMeta, downCastNat, downCastNumeric, downCastReal, downCastSum, downCastTuple, downCastVoid, equals, equals, isArray, isAugmentedReal, isAutomaton, isBasicAutomaton, isBool, isChar, isCompositeAutomaton, isConstructor, isDiscreteReal, isEnum, isEnumValue, isEqualTo, isError, isFloat, isFun, isFunctional, isFunctionalGeneric, isGeneric, isId, isIndexed, isInstance, isInt, isInt32, isList, isMap, isMeta, isNat, isNumeric, isParameter, isReal, isSum, isTuple, isVariable, isVoid, lub, select
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeParameter

public TypeParameter(java.lang.String n)
Method Detail

bind

public void bind(Type t)

unbind

public void unbind()

resolve

public Type resolve()
Description copied from class: Type
Replaces any bound type parameters with thier bound types. If all parameters are bound, the resulting type is not generic. If no parameters are bounf, the resulting type is this.

Overrides:
resolve in class Type
Returns:
a resolved type

downCastParameter

public TypeParameter downCastParameter()
Overrides:
downCastParameter in class Type

compare

public Type.Order compare(Type t)
Description copied from class: Type
Determines how Type t is realted to this.

Specified by:
compare in class Type
Parameters:
t - to compare to this
Returns:

getName

public java.lang.String getName()
Overrides:
getName in class Type

is

public boolean is(Type.TypeKind kind)
Description copied from class: Type
Determines if the currently instance is of given TypeKind.

Overrides:
is in class Type
Parameters:
kind - the type of class to compare to
Returns:
true if this is of given TypeKind

isBound

public boolean isBound()

toString

public java.lang.String toString()
Overrides:
toString in class Type

visit

public void visit(TypeVisitor v)
Specified by:
visit in class Type