step10
Class type.ProcT

java.lang.Object
  extended by java.util.AbstractCollection
      extended by java.util.AbstractList
          extended by java.util.ArrayList
              extended by step10.type.T
                  extended by step10.type.ProcT
All Implemented Interfaces:
Serializable, Cloneable, Iterable, Collection, List, RandomAccess
Direct Known Subclasses:
type.PBegin, type.PCall, type.PDeref, type.PIf, type.PLet, type.PLetrec, type.PVar
Enclosing class:
type

public static class type.ProcT
extends type.T

base class for procedures, itself used to represent a mini.yyTree.Proc. No descendants if used to represent a type.

See Also:
Serialized Form

Field Summary
protected  String[] names
          parameter names, null in derived classes and in type.
protected  type.T[] params
          parameter types, null in derived classes, possibly empty.
protected  type.T result
          result type, null in derived classes.
 
Fields inherited from class step10.type.T
map, type
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected type.ProcT(Object type, List sub)
           
protected type.ProcT(type.T result, String name, type.T[] params, String[] names, List body)
           
protected type.ProcT(type.T result, type.T[] params)
           
 
Method Summary
 String asString()
          ask type.T.type to provide type display.
protected  void asString(StringBuffer buf)
          compose type display.
 List body()
          returns the second descendant, the procedure body.
 boolean equals(Object o)
          type equality: two type.ProcT with equal result type and equal parameter types.
 String name()
          returns the first descendant, the procedure name.
 String[] names()
           
 type.T[] params()
           
protected  void params(StringBuffer buf)
          append parameter type list, if any.
protected  void primitive(StringBuffer buf)
          append primitive result type.
 type.T result()
           
 String toPrefix()
          returns type-specific prefix.
 
Methods inherited from class step10.type.T
type
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Field Detail

result

protected final type.T result
result type, null in derived classes.


params

protected final type.T[] params
parameter types, null in derived classes, possibly empty.


names

protected final String[] names
parameter names, null in derived classes and in type.

Constructor Detail

type.ProcT

protected type.ProcT(type.T result,
                     type.T[] params)

type.ProcT

protected type.ProcT(type.T result,
                     String name,
                     type.T[] params,
                     String[] names,
                     List body)

type.ProcT

protected type.ProcT(Object type,
                     List sub)
Method Detail

result

public type.T result()

params

public type.T[] params()

names

public String[] names()

name

public String name()
returns the first descendant, the procedure name.


body

public List body()
returns the second descendant, the procedure body.


toPrefix

public String toPrefix()
Description copied from class: type.T
returns type-specific prefix.

Specified by:
toPrefix in class type.T

equals

public boolean equals(Object o)
type equality: two type.ProcT with equal result type and equal parameter types.

Specified by:
equals in interface Collection
Specified by:
equals in interface List
Overrides:
equals in class AbstractList

asString

public String asString()
ask type.T.type to provide type display.

Specified by:
asString in class type.T

asString

protected void asString(StringBuffer buf)
compose type display. This is only called in the base class.


primitive

protected void primitive(StringBuffer buf)
append primitive result type.


params

protected void params(StringBuffer buf)
append parameter type list, if any.