|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcompiler.semantic.type.TypeTable
public class TypeTable
Clase que representa la tabla de tipos. Ha de ser implementada por el estudiante
Constructor Summary | |
---|---|
TypeTable()
Constructor for TypeTable. |
|
TypeTable(ScopeIF scope)
Constructor for TypeTable. |
Method Summary | |
---|---|
boolean |
containsType(java.lang.String name)
Indicates whether the type is contained in the type table. |
boolean |
containsType(TypeIF symbol)
Indicates whether the type is contained in the type table. |
boolean |
equals(java.lang.Object other)
Compares this object with another one. |
ScopeIF |
getScope()
Returns the scope of this Symbol table. |
TypeIF |
getType(java.lang.String name)
Looks up a type by name. |
java.util.List |
getTypes()
Returns the list of types. |
int |
hashCode()
Returns a hash code for the object. |
void |
setType(java.lang.String name,
TypeIF type)
Sets a type in the type table. |
void |
setType(TypeIF type)
Sets a type in the type 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 TypeTable()
public TypeTable(ScopeIF scope)
scope
- The scope where type table is defined.Method Detail |
---|
public boolean containsType(java.lang.String name)
containsType
in interface TypeTableIF
name
- The type name.
public boolean containsType(TypeIF symbol)
containsType
in interface TypeTableIF
type
- The type.
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
other
- the other object.
public ScopeIF getScope()
getScope
in interface TypeTableIF
public TypeIF getType(java.lang.String name)
getType
in interface TypeTableIF
name
- The name of the type.
public java.util.List getTypes()
getTypes
in interface TypeTableIF
public int hashCode()
hashCode
in class java.lang.Object
public void setType(java.lang.String name, TypeIF type)
setType
in interface TypeTableIF
name
- the type name.type
- the type.public void setType(TypeIF type)
setType
in interface TypeTableIF
type
- the type.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 |