es.uned.compiler.semantic.type
Class TypeBase

java.lang.Object
  extended by es.uned.compiler.semantic.type.TypeBase
All Implemented Interfaces:
TypeIF
Direct Known Subclasses:
TypeArray, TypeEnum, TypeProcedure, TypeRecord, TypeSimple

public abstract class TypeBase
extends java.lang.Object
implements TypeIF

Clase de la que heredaran aquellas que representen los posibles tipos. Hereda de la clase TypeIF


Constructor Summary
TypeBase(ScopeIF scope)
          s Constructor for TypeBase.
TypeBase(ScopeIF scope, java.lang.String name)
          Constructor for TypeBase.
TypeBase(TypeIF type)
           
 
Method Summary
 boolean equals(java.lang.Object other)
          Compares this object with another one.
 java.lang.String getName()
          Returns the name.
 ScopeIF getScope()
          Returns the scope.
 int hashCode()
          Returns a hash code for the object.
 void setName(java.lang.String name)
          Sets The name.
 void setScope(ScopeIF scope)
          Sets The scope.
 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

TypeBase

public TypeBase(ScopeIF scope)
s Constructor for TypeBase.

Parameters:
scope - The scope.

TypeBase

public TypeBase(ScopeIF scope,
                java.lang.String name)
Constructor for TypeBase.

Parameters:
scope - The scope
name - The name.

TypeBase

public TypeBase(TypeIF type)
Method Detail

equals

public boolean equals(java.lang.Object other)
Compares this object with another one.

Overrides:
equals in class java.lang.Object
Parameters:
other - the other object.
Returns:
true if two objects has the same properties.

getName

public java.lang.String getName()
Returns the name.

Specified by:
getName in interface TypeIF
Returns:
Returns the name.

getScope

public ScopeIF getScope()
Returns the scope.

Specified by:
getScope in interface TypeIF
Returns:
Returns the scope.

hashCode

public int hashCode()
Returns a hash code for the object.

Overrides:
hashCode in class java.lang.Object

setName

public void setName(java.lang.String name)
Sets The name.

Specified by:
setName in interface TypeIF
Parameters:
name - The name to set.

setScope

public void setScope(ScopeIF scope)
Sets The scope.

Specified by:
setScope in interface TypeIF
Parameters:
scope - The scope to set.

toString

public java.lang.String toString()
Return a string representing the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representing the object.