|
|||||||||
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.LoopTemplate
Create a loop element in a method
Field Summary | |
static int |
DO
constant to define a do while loop |
static int |
FOR
constant to define a for loop |
static int |
WHILE
constant to define a while loop |
Fields inherited from class org.brains2b.typewriter.ContentTemplate |
m_content |
Constructor Summary | |
LoopTemplate(int type,
java.lang.String condition)
Constructor |
Method Summary | |
void |
setCondition(java.lang.String condition)
set the condition. |
void |
write(java.io.PrintWriter writer,
int indent)
overwrite this to implement a content types specific needs and call super.write(PrintWriter,int) to write out
the content for this method. |
Methods inherited from class org.brains2b.typewriter.ContentTemplate |
addImport, addText, createFor, createIf, createTry, createWhile, getContent, getParent, makeInstance, makeInstance, makeInstance, setContent, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DO
public static final int WHILE
public static final int FOR
Constructor Detail |
public LoopTemplate(int type, java.lang.String condition)
type
- int, one of the loop types (DO|WHILE|FOR)condition
- String, a complete condition for this loop i.e.
int i=0;i in a for loop.
Method Detail |
public void write(java.io.PrintWriter writer, int indent)
ContentTemplate
super.write(PrintWriter,int)
to write out
the content for this method.
write
in interface Template
write
in class ContentTemplate
Template.write(java.io.PrintWriter, int)
public void setCondition(java.lang.String condition)
condition
- String, the condition for this loop
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |