org.enhydra.xml.xmlc.codegen
Class JavaField

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.codegen.JavaVariable
        |
        +--org.enhydra.xml.xmlc.codegen.JavaField

public final class JavaField
extends JavaVariable

Class to store a class field. Objects of this class are immutable.


Fields inherited from class org.enhydra.xml.xmlc.codegen.JavaVariable
fDoc, fModifiers, fName, fType
 
Constructor Summary
JavaField(String name, String type, int modifiers, String[] doc, Object initializer)
          Constructor with doc array.
JavaField(String name, String type, int modifiers, String doc, Object initializer)
          Constructor with doc array.
 
Method Summary
 void print(IndentWriter out)
          Print declaration and initialization of field.
 
Methods inherited from class org.enhydra.xml.xmlc.codegen.JavaVariable
getDoc, getModifiers, getName, getType, printDefinition
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaField

public JavaField(String name,
                 String type,
                 int modifiers,
                 String[] doc,
                 Object initializer)
Constructor with doc array.
Parameters:
name - The field name.
type - The field type.
modifiers - The modifier bit set.
doc - The field documentation, where each row is a line of the document. If null, no documention is created.
initializer - The code to initialize the variable, or null if none. Should not include `=' or closing `;'. This can be a String (for scaler initialization) or JavaCode object (for array initialization).

JavaField

public JavaField(String name,
                 String type,
                 int modifiers,
                 String doc,
                 Object initializer)
Constructor with doc array.
Parameters:
name - The field name.
type - The field type.
modifiers - The modifier bit set.
doc - The field documentation. If null, no documention is created.
initializer - The code to initialize the variable, or null if none. Should not include `=' or closing `;'. This can be a String (for scaler initialization) or JavaCode object (for array initialization).
Method Detail

print

public void print(IndentWriter out)
Print declaration and initialization of field.


Copyright © 1999-2002 enhydra.org (Mark Diekhans, David Li, Richard Kunze). All Rights reserved.