macros
Class ENUM_INT

java.lang.Object
  |
  +--jatha.Macro
        |
        +--macros.ENUM_INT

public class ENUM_INT
extends Macro

ENUM_INT(elem1, elem2, ...)

This macro creates an integer-based enumeration. That is, each element of the enumeration is represented as a unique integer value. Example: @ENUM_INT(BLAH, QWERTY, ELMO) will generate something like this:

 public static final int BLAH = 1;
 public static final int QWERTY = 2;
 public static final int ELMO = 3;
 

Note: this macro only declares some member variables and methods, it doesn't declare an entire class like ENUM_OBJ.

Also note: the enumeration starts at 1. This allows zero to indicate an uninitialized or invalid value.

See Also:
ENUM_OBJ

Fields inherited from class jatha.Macro
util
 
Constructor Summary
ENUM_INT()
           
 
Method Summary
 void expand(java.lang.String[] args, java.io.Writer out, Expander expander)
          Expands the macro
 
Methods inherited from class jatha.Macro
expand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ENUM_INT

public ENUM_INT()
Method Detail

expand

public void expand(java.lang.String[] args,
                   java.io.Writer out,
                   Expander expander)
            throws java.io.IOException
Expands the macro
Overrides:
expand in class Macro