scale.clef.symtab
Class SymtabEntry

java.lang.Object
  extended by scale.clef.symtab.SymtabEntry

public final class SymtabEntry
extends java.lang.Object

This class represents an entry in the symbol table.

$Id: SymtabEntry.java,v 1.27 2006-03-17 14:47:08 burrill Exp $

Copyright 2008 by the Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.

A symbol table entry is a declataion and a link to its scope.


Constructor Summary
SymtabEntry(SymtabScope scope, Declaration declaration)
          Create a symbol table entry for the declaration in the specified scope.
 
Method Summary
 Declaration getDecl()
          Return the declaration for the symbol.
 java.lang.String getIdentifier()
          Return the name of the symbol.
 SymtabScope getScope()
          Return the scope in which this entry resides.
 int getScopeNumber()
          Return the number of the scope.
 Type getType()
          Return the type of the symbol.
 void setDecl(Declaration decl)
          Return the declaration for the symbol.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SymtabEntry

public SymtabEntry(SymtabScope scope,
                   Declaration declaration)
Create a symbol table entry for the declaration in the specified scope.

Method Detail

getScopeNumber

public final int getScopeNumber()
Return the number of the scope.


getScope

public final SymtabScope getScope()
Return the scope in which this entry resides.


getIdentifier

public final java.lang.String getIdentifier()
Return the name of the symbol.


getDecl

public final Declaration getDecl()
Return the declaration for the symbol.


setDecl

public final void setDecl(Declaration decl)
Return the declaration for the symbol.


getType

public final Type getType()
Return the type of the symbol.


toString

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