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.
Constructor Summary |
JavaField(java.lang.String name,
java.lang.String type,
int modifiers,
java.lang.String[] doc,
java.lang.Object initializer)
Constructor with doc array. |
JavaField(java.lang.String name,
java.lang.String type,
int modifiers,
java.lang.String doc,
java.lang.Object initializer)
Constructor with doc array. |
Method Summary |
void |
print(IndentWriter out)
Print declaration and initialization of field. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JavaField
public JavaField(java.lang.String name,
java.lang.String type,
int modifiers,
java.lang.String[] doc,
java.lang.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(java.lang.String name,
java.lang.String type,
int modifiers,
java.lang.String doc,
java.lang.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).
print
public void print(IndentWriter out)
- Print declaration and initialization of field.