org.codehaus.modello.generator.java.javasource
public class JSourceCode extends Object
Version: $Revision: 149 $ $Date: 2004-09-29 13:32:16 -0400 (Wed, 29 Sep 2004) $
Constructor Summary | |
---|---|
JSourceCode()
Creates an empty JSourceCode
| |
JSourceCode(String sourceCode)
Creates a JSourceCode and adds the given String
to it's contents |
Method Summary | |
---|---|
void | add(String statement)
Adds the given statement to this JSourceCode. |
void | add(String statement, short indentSize)
Adds the given statement to this JSourceCode. |
void | addIndented(String statement)
Adds the given statement to this JSourceCode. |
void | append(String segment)
Appends the given String to the last line in this
JSourceCode |
void | clear()
Clears all the code statements from this JSourceCode
|
void | copyInto(JSourceCode jsc)
Copies the contents of this JSourceCode into the given JSourceCode |
void | indent()
Increases the current indent level by 1
|
boolean | isEmpty()
Returns true if this JSourceCode is empty (ie. no source). |
void | print(JSourceWriter jsw)
Prints this JSourceCode to the given JSourceWriter |
String | toString()
Returns the String representation of this JSourceCode |
void | unindent()
Decreases the indent level by 1
|
Parameters: sourceCode the source to add
Parameters: statement the statement to add
Parameters: statement the statement to add the indentSize is the size of the indentation to use when printing this JSourceCode
See Also: JSourceCode
indent();
add(statement);
unindent();
Parameters: statement the statement to add
Parameters: segment the String to append
Parameters: jsc the JSourceCode to copy this JSourceCode into
Returns: true if this JSourceCode is empty.
Parameters: jsw the JSourceWriter to print to
Returns: the String representation of this JSourceCode