acg.tools
Class Variable

java.lang.Object
  |
  +--acg.tools.Variable

public class Variable
extends java.lang.Object

The Variable class is a container class that links the type of the variable with its name. It used by AthenaTranslation along with the Message class to construct a tree which the ACGGenerate class can traverse to generate .java files.

See Also:
Message, AthenaTranslation, ACGGenerate

Constructor Summary
Variable(byte id, java.lang.String n)
          Constructs the variable with the given name and type.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getName()
           
 byte getType()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Variable

public Variable(byte id,
                java.lang.String n)
Constructs the variable with the given name and type. Note that variables are usually Nonces, Principals, Keys. The name is fixed so that the name complies with Java syntax.
Parameters:
id - the type of this variable, as defined in ACGUtils.
n - the name of this variable.
Method Detail

getType

public byte getType()
Returns:
a byte from ACGUtils describing the type of this object.

getName

public java.lang.String getName()
Returns:
the name of this variable.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
the string representation of this object.

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Returns:
true if the object is a variable with the same name. Doesn't check type equality.