fmrisc.Semantics
Class TypeSymbol

java.lang.Object
  extended by fmrisc.Semantics.SymbolBase
      extended by fmrisc.Semantics.TypeSymbol
All Implemented Interfaces:
Symbol

public final class TypeSymbol
extends SymbolBase

Symbols in TypeTable.


Constructor Summary
TypeSymbol(TypeDeclIdentifier ident)
          Construct type symbol from ident (type is set to null).
 
Method Summary
 Type getType()
          Return type of symbol.
 TypeDeclIdentifier getTypeDeclIdentifier()
          Return identifier of symbol.
 void instantiate(TypeSymbol symbol)
          Instantiate symbol with copy of denoted symbol.
 void setType(Type type)
          Set type of symbol to type.
 
Methods inherited from class fmrisc.Semantics.SymbolBase
getIdentifier
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypeSymbol

public TypeSymbol(TypeDeclIdentifier ident)
Construct type symbol from ident (type is set to null).

Parameters:
ident - the identifier of the symbol
Method Detail

getTypeDeclIdentifier

public TypeDeclIdentifier getTypeDeclIdentifier()
Return identifier of symbol.

Returns:
the symbol identifier

getType

public Type getType()
Return type of symbol.

Returns:
the symbol type

setType

public void setType(Type type)
Set type of symbol to type.

Parameters:
type - the symbol type.

instantiate

public void instantiate(TypeSymbol symbol)
Instantiate symbol with copy of denoted symbol. The identifier is *not* copied from the denoted symbol.

Parameters:
symbol - the symbol from which the instantiation is derived