|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.typewriter.ContentTemplate
org.brains2b.typewriter.IfTemplate
Template for creating conditions and else statements in another ContentTemplate
ContentTemplate.createIf(String)
Field Summary |
Fields inherited from class org.brains2b.typewriter.ContentTemplate |
m_content |
Constructor Summary | |
IfTemplate(java.lang.String condition)
Constructor for IfTemplate. |
Method Summary | |
IfTemplate |
createElse()
create an else statement for this condition |
void |
setCondition(java.lang.String condition)
set the expression to evaluate for this condition |
void |
write(java.io.PrintWriter writer,
int indent)
This implementation of write follows the rule that if this statement has an else statement which only contains another if statement the statement should read } else if (
instead of closing the else and starting with a new condition. |
Methods inherited from class org.brains2b.typewriter.ContentTemplate |
addImport, addText, createFor, createIf, createTry, createWhile, getContent, getObjectName, getParent, makeInstance, makeInstance, makeInstance, makeInstance, makeInstance, setContent, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IfTemplate(java.lang.String condition)
condition
- String, an expression defining the condition for this statementMethod Detail |
public void write(java.io.PrintWriter writer, int indent)
This implementation of write follows the rule that if
this statement has an else statement which only contains
another if statement the statement should read } else if (
instead of closing the else and starting with a new condition.
write
in interface Template
write
in class ContentTemplate
Template.write(java.io.PrintWriter, int)
public IfTemplate createElse()
public void setCondition(java.lang.String condition)
condition
- String, the expression
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |