org.inxar.jenesis
Interface Freeform

All Superinterfaces:
Codeable, Expression

public interface Freeform
extends Expression

Expression subinterface for freeform expressions. The freeform expression is a very general container expression for (hopefully) exceptional instances in which it the api is too difficult or cumbersome and one needs to inject a source code directly. This structure simply copies the text given in setCode. No semicolon is appended.


Method Summary
 Freeform dedentLine()
          Decrements the tab and calls newLine()
 java.lang.String getCode()
          Gets the code for this expression.
 int getIndentNumber()
          Returns the current number of indentation levels.
 Freeform indentLine()
          Increments the tab and calls newLine()
 boolean isLineNew()
          Returns true if no characters have been written since the last call of newLine().
 Freeform newLine()
          Adds a the newLine string according to System.getProperty("line.separator") and the line is padded with the n tab characters where n is the number returned by getIndentNumber().
 Freeform resetLine()
          Resets the tab counter to zero and calls the newLine() method.
 void setCode(java.lang.String code)
          Sets the code for this expression.
 Freeform space()
          Writes a single space.
 Freeform write(boolean b)
          Writes a boolean.
 Freeform write(char c)
          Writes a single character.
 Freeform write(char[] chars)
          Writes an array of characters.
 Freeform write(double d)
          Writes a double.
 Freeform write(float f)
          Writes a float.
 Freeform write(int i)
          Writes an integer.
 Freeform write(java.lang.Object o)
          Writes an object.
 Freeform write(java.lang.Object[] ao)
          Writes each element of the given object array.
 Freeform write(java.lang.String s)
          Writes a string.
 
Methods inherited from interface org.inxar.jenesis.Expression
getType
 
Methods inherited from interface org.inxar.jenesis.Codeable
getComment, setComment, toCode, vm
 

Method Detail

setCode

public void setCode(java.lang.String code)
Sets the code for this expression.

getCode

public java.lang.String getCode()
Gets the code for this expression.

write

public Freeform write(boolean b)
Writes a boolean.

write

public Freeform write(char c)
Writes a single character.

write

public Freeform write(char[] chars)
Writes an array of characters.

write

public Freeform write(int i)
Writes an integer.

write

public Freeform write(float f)
Writes a float.

write

public Freeform write(double d)
Writes a double.

write

public Freeform write(java.lang.String s)
Writes a string.

write

public Freeform write(java.lang.Object o)
Writes an object.

write

public Freeform write(java.lang.Object[] ao)
Writes each element of the given object array.

space

public Freeform space()
Writes a single space.

newLine

public Freeform newLine()
Adds a the newLine string according to System.getProperty("line.separator") and the line is padded with the n tab characters where n is the number returned by getIndentNumber().

resetLine

public Freeform resetLine()
Resets the tab counter to zero and calls the newLine() method.

indentLine

public Freeform indentLine()
Increments the tab and calls newLine()

dedentLine

public Freeform dedentLine()
Decrements the tab and calls newLine()

isLineNew

public boolean isLineNew()
Returns true if no characters have been written since the last call of newLine().

getIndentNumber

public int getIndentNumber()
Returns the current number of indentation levels.