SFE.Compiler
Class IntType

java.lang.Object
  extended by SFE.Compiler.Type
      extended by SFE.Compiler.IntType

public class IntType
extends Type

A class representing the integer primitive type of an arbitrary length. An object of type Int contains a single field whose type is int and represents the int's length. An Int type of one bit is actualy a boolean variable.


Constructor Summary
IntType(int length)
          Constructs an IntType object of a given length.
 
Method Summary
 int size()
          Returns the length of this Int type in bits.
 java.lang.String toFormat()
          Returns a string representation of the object for the format file.
 java.lang.String toString()
          Returns a string representation of the object.
 
Methods inherited from class SFE.Compiler.Type
defineName, fromName, getDerivedLvalues, hasDerives
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IntType

public IntType(int length)
Constructs an IntType object of a given length.

Parameters:
length - the Int type length.
Method Detail

size

public int size()
Returns the length of this Int type in bits.

Specified by:
size in class Type
Returns:
the length of this Int type in bits.

toString

public java.lang.String toString()
Returns a string representation of the object.

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

toFormat

public java.lang.String toFormat()
Returns a string representation of the object for the format file.

Specified by:
toFormat in class Type
Returns:
a string representation of the object for the format file.