org.enhydra.xml.xmlc.codegen
Class JavaCode

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

public final class JavaCode
extends Object

Class used to build the code body of a method.


Constructor Summary
JavaCode()
          Constructor.
 
Method Summary
 void add(String code)
          Add of code to the current line
 void addln()
          Add an EOLN
 void addln(String line)
          Add of a line of code.
 void addln(String[] lines)
          Add multiple lines of code.
 void addVars(String line)
          Add variables that will be inserted at the top of the code body.
 void addVars(String[] lines)
          Add variables that will be inserted at the top of the code body.
 void enter()
          Increase indentation level.
 boolean isEmpty()
          Determine if there is any code in the block.
 void leave()
          Decrease indentation level.
 void print(IndentWriter out)
          Print Java code.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaCode

public JavaCode()
Constructor.
Method Detail

enter

public final void enter()
Increase indentation level.

leave

public final void leave()
Decrease indentation level.

addln

public void addln()
Add an EOLN

add

public void add(String code)
Add of code to the current line

addln

public void addln(String line)
Add of a line of code.

addln

public void addln(String[] lines)
Add multiple lines of code.

addVars

public void addVars(String line)
Add variables that will be inserted at the top of the code body.

addVars

public void addVars(String[] lines)
Add variables that will be inserted at the top of the code body.

isEmpty

public boolean isEmpty()
Determine if there is any code in the block.

print

public void print(IndentWriter out)
Print Java code.


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