org.enhydra.xml.xmlc.codegen
Class JavaVariable

java.lang.Object
  |
  +--org.enhydra.xml.xmlc.codegen.JavaVariable
Direct Known Subclasses:
JavaField, JavaParameter

public abstract class JavaVariable
extends Object

Base class for classes that describe variables. Objects of this class are immutable.


Field Summary
protected  String[] fDoc
           
protected  int fModifiers
           
protected  String fName
          Attributes of the variable
protected  String fType
           
 
Constructor Summary
JavaVariable(String name, String type, int modifiers, String doc)
          Constructor with doc string.
JavaVariable(String name, String type, int modifiers, String[] doc)
          Constructor with doc array.
 
Method Summary
protected  String[] getDoc()
          Get the documentation, or null if there is none.
 int getModifiers()
          Get the modifiers.
 String getName()
          Get the name.
 String getType()
          Get the type.
 void printDefinition(PrintWriter out)
          Output the variable definition without a `;' terminator.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fName

protected String fName
Attributes of the variable

fType

protected String fType

fModifiers

protected int fModifiers

fDoc

protected String[] fDoc
Constructor Detail

JavaVariable

public JavaVariable(String name,
                    String type,
                    int modifiers,
                    String[] doc)
Constructor with doc array.
Parameters:
name - The variable name.
type - The variable type.
modifiers - The variable modifier bit set.
doc - The variable documentation, where each row is a line of the document. If null, no documention is created.
See Also:
JavaModifiers

JavaVariable

public JavaVariable(String name,
                    String type,
                    int modifiers,
                    String doc)
Constructor with doc string.
Parameters:
name - The variable name.
type - The variable type.
modifiers - The variable modifier bit set.
doc - The variable documentation. If null, no documention is created.
See Also:
JavaModifiers
Method Detail

getName

public String getName()
Get the name.

getType

public String getType()
Get the type.

getModifiers

public int getModifiers()
Get the modifiers.

getDoc

protected String[] getDoc()
Get the documentation, or null if there is none.

printDefinition

public void printDefinition(PrintWriter out)
Output the variable definition without a `;' terminator.


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