|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcompiler.semantic.symbol.SymbolTable
public class SymbolTable
Clase que representa una tabla de símbolos. Ha de ser implementada por el estudiante
Constructor Summary | |
---|---|
SymbolTable()
Constructor for TypeTable. |
|
SymbolTable(ScopeIF scope)
Constructor for TypeTable. |
Method Summary | |
---|---|
boolean |
containsSymbol(java.lang.String name)
Indicates whether the symbol is contained in the symbol table. |
boolean |
containsSymbol(SymbolIF symbol)
Indicates whether the symbol is contained in the symbol table. |
boolean |
equals(java.lang.Object other)
Compares this object with another one. |
ScopeIF |
getScope()
Returns the scope of this Symbol table. |
SymbolIF |
getSymbol(java.lang.String name)
Returns a symbol from the symbol table. |
java.util.List |
getSymbols()
Returns the list of symbols. |
int |
hashCode()
Returns a hash code for the object. |
void |
setSymbol(java.lang.String name,
SymbolIF symbol)
Sets a symbol to the symbol table. |
java.lang.String |
toString()
Return a string representing the object. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SymbolTable()
public SymbolTable(ScopeIF scope)
The
- scope of the symbol table.Method Detail |
---|
public boolean containsSymbol(java.lang.String name)
containsSymbol
in interface SymbolTableIF
name
- The symbol name.
public boolean containsSymbol(SymbolIF symbol)
containsSymbol
in interface SymbolTableIF
symbol
- The symbol.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other object.
public ScopeIF getScope()
getScope
in interface SymbolTableIF
public SymbolIF getSymbol(java.lang.String name)
getSymbol
in interface SymbolTableIF
name
- the symbol key.public java.util.List getSymbols()
getSymbols
in interface SymbolTableIF
public int hashCode()
hashCode
in class java.lang.Object
public void setSymbol(java.lang.String name, SymbolIF symbol)
setSymbol
in interface SymbolTableIF
name
- the symbol name.symbol
- the symbol.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |