org.norecess.citkit.tir.declarations
Class TypeDTIR

java.lang.Object
  extended by org.norecess.citkit.tir.declarations.TypeDTIR
All Implemented Interfaces:
ITypeDTIR, DeclarationTIR, HobbesTIR

public class TypeDTIR
extends java.lang.Object
implements ITypeDTIR

The TIR for a type declaration.

Author:
Jeremy D. Frens

Constructor Summary
TypeDTIR(IPosition position, java.lang.String name, TypeTIR type)
          Constructs a new type declaration.
TypeDTIR(java.lang.String name, TypeTIR type)
          Basic constructor.
 
Method Summary
<T> T
accept(DeclarationTIRVisitor<T> visitor)
          Implements the visitor pattern with DeclarationTIRVisitor.
 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 TIR.
 TypeTIR getType()
          Returns the type.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TypeDTIR

public TypeDTIR(IPosition position,
                java.lang.String name,
                TypeTIR type)
Constructs a new type declaration.

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

TypeDTIR

public TypeDTIR(java.lang.String name,
                TypeTIR type)
Basic constructor.

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

getPosition

public IPosition getPosition()
Description copied from interface: DeclarationTIR
Retrieves the position of the code that generated the TIR.

Specified by:
getPosition in interface DeclarationTIR
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 ITypeDTIR
Returns:
the name of the type.

getType

public TypeTIR getType()
Returns the type.

Specified by:
getType in interface ITypeDTIR
Returns:
the type.

accept

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

Specified by:
accept in interface DeclarationTIR
Parameters:
visitor - the visitor object.
Returns:
the result of visiting the TIR 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