org.norecess.citkit.tir.types
Class ArrayTTIR

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

public class ArrayTTIR
extends java.lang.Object
implements IArrayTIR

The AST for an array type.

Author:
Jeremy D. Frens

Constructor Summary
ArrayTTIR(IPosition position, java.lang.String elementType)
          Constructs an array type.
ArrayTTIR(java.lang.String elementType)
          Basic constructor.
 
Method Summary
<T> T
accept(TypeTIRVisitor<T> visitor)
          Implements the visitor pattern with TypeTIRVisitor.
 boolean equals(java.lang.Object other)
           
 java.lang.String getElementType()
          Returns the type of the array.
 IPosition getPosition()
          Retrieves the position of the code that generated the AST.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ArrayTTIR

public ArrayTTIR(IPosition position,
                 java.lang.String elementType)
Constructs an array type.

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

ArrayTTIR

public ArrayTTIR(java.lang.String elementType)
Basic constructor.

Parameters:
elementType - the type of the elements.
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.

getElementType

public java.lang.String getElementType()
Returns the type of the array.

Specified by:
getElementType in interface IArrayTIR
Returns:
the type of the array.

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 other)
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