|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.typewriter.CommentTemplate
Create a comment in a ClassTemplate
TODO this should also be used to create Javadoc and comments for methods
Field Summary | |
protected java.util.List |
m_content
|
Constructor Summary | |
CommentTemplate()
Constructor |
Method Summary | |
void |
addImport(java.lang.String name)
add an String as import to the top class of this element |
void |
addText(java.lang.String text)
add a comment line to the content of this template. |
java.util.List |
getContent()
get the content for this template The vector will either contain Strings or other ContentTemplates |
Template |
getParent()
get the direct parent of this element. This can be the class, method, try element or loop elements |
void |
setContent(java.util.List content)
set the content for this Template The vector should contain either contain Strings or other ContentTemplates |
void |
setParent(Template t)
set the direct parent of this element The parent can be the class, method, try element or loop elements |
void |
write(java.io.PrintWriter writer,
int indent)
write the template information to the PrintWriter at the given indention. Indention is multiplied by |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.List m_content
Constructor Detail |
public CommentTemplate()
Method Detail |
public void addImport(java.lang.String name)
addImport
in interface Template
name
- String, the fully qualified class name. Could be used
to enter the complete package by adding *
public Template getParent()
This can be the class, method, try element or loop elements
getParent
in interface Template
public void setParent(Template t)
The parent can be the class, method, try element or loop elements
setParent
in interface Template
t
- Template, the parent of this elementpublic void write(java.io.PrintWriter writer, int indent)
Indention is multiplied by 4
to supply the spaces
for the indention.
write
in interface Template
writer
- PrintWriter, an initialized PrintWriter to write this
element of the Class toindent
- int, the indention for this element.
Value is multiplied by four to give the number of spaces used for indention
public void addText(java.lang.String text)
The line-end will be added by this Template
text
- String, a line to add to the contentpublic java.util.List getContent()
The vector will either contain Strings or other ContentTemplates
public void setContent(java.util.List content)
The vector should contain either contain Strings or other ContentTemplates
content
- Vector, a list of objects contained in this template, if null is inserted
the content of this ContentTemplate will be removed and getContent() will return
an empty Vector, not null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |