org.norecess.citkit.tir.types
Class NameTTIR

java.lang.Object
  extended by org.norecess.citkit.tir.types.NameTTIR
All Implemented Interfaces:
HobbesTIR, INameTTIR, TypeTIR

public class NameTTIR
extends java.lang.Object
implements INameTTIR

The AST for a named type.

Author:
Jeremy D. Frens

Constructor Summary
NameTTIR(IPosition position, java.lang.String name)
          Constructs a name type.
NameTTIR(java.lang.String name)
          Basic constructor.
 
Method Summary
<T> T
accept(TypeTIRVisitor<T> visitor)
          Implements the visitor pattern with TypeTIRVisitor.
 boolean equals(java.lang.Object o)
           
 java.lang.String getName()
          Returns the name of the type.
 IPosition getPosition()
          Retrieves the position of the code that generated the AST.
 ISymbol getSymbol()
          Returns the name of the type as a symbol.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NameTTIR

public NameTTIR(IPosition position,
                java.lang.String name)
Constructs a name type.

Parameters:
position - the position of the name type in the source code.
name - the name type.

NameTTIR

public NameTTIR(java.lang.String name)
Basic constructor.

Parameters:
name - the name of the type.
Method Detail

getPosition

public IPosition getPosition()
Retrieves the position of the code that generated the AST.

Specified by:
getPosition in interface HobbesTIR
Returns:
the position of the code in the source code.

getName

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

Specified by:
getName in interface INameTTIR
Returns:
the name of the type.

getSymbol

public ISymbol getSymbol()
Returns the name of the type as a symbol.

Specified by:
getSymbol in interface INameTTIR
Returns:
the name of the type as a symbol.

accept

public <T> T accept(TypeTIRVisitor<T> visitor)
Description copied from interface: TypeTIR
Implements the visitor pattern with TypeTIRVisitor.

Specified by:
accept in interface TypeTIR
Parameters:
visitor - the visitor object.
Returns:
the result of visiting the AST with the visitor.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

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