orc.type.tycon
Class Tycon

java.lang.Object
  extended by orc.type.Type
      extended by orc.type.tycon.Tycon
Direct Known Subclasses:
ClassTycon, DatatypeTycon, ImmutableContainerType, MutableContainerType, PolymorphicAliasedType

public abstract class Tycon
extends Type

Root class for all type constructors. By default, the instance method for a tycon simply creates a TypeInstance type of that tycon on the instance parameters. The TypeInstance class handles subtype, meet, and join for such instances. It is assumed that all children of Tycon will implement variances() such that its size() > 0, but there is no way to enforce this condition in Java.

Author:
dkitchin

Field Summary
 
Fields inherited from class orc.type.Type
BOOLEAN, BOT, INTEGER, LET, NUMBER, SIGNAL, STRING, TOP
 
Constructor Summary
Tycon()
           
 
Method Summary
 Tycon asTycon()
           
 boolean equals(java.lang.Object that)
           
 int hashCode()
           
 Type instance()
           
 Type instance(java.util.List<Type> params)
           
 Type instance(Type param)
           
 Type makeCallableInstance(java.util.List<Type> params)
           
 
Methods inherited from class orc.type.Type
addConstraints, allFreeVars, assertSubtype, call, call, closed, demote, equal, findVariance, freeVars, fromJavaClass, fromJavaMethod, fromJavaMethods, fromJavaType, fromJavaType, isBot, isTop, javaCounterpart, join, makeJavaCtx, makeJavaCtx, marshal, meet, promote, resolveSites, shiftFreeVars, subst, substAll, subtype, supertype, toString, unwrapAs, variances
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tycon

public Tycon()
Method Detail

instance

public Type instance(java.util.List<Type> params)
              throws TypeException
Throws:
TypeException

instance

public Type instance()
              throws TypeException
Throws:
TypeException

instance

public Type instance(Type param)
              throws TypeException
Throws:
TypeException

makeCallableInstance

public Type makeCallableInstance(java.util.List<Type> params)
                          throws TypeException
Throws:
TypeException

equals

public boolean equals(java.lang.Object that)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

asTycon

public Tycon asTycon()
Overrides:
asTycon in class Type