public class CommentTemplate extends java.lang.Object implements Template
| Modifier and Type | Field and Description |
|---|---|
protected java.util.List |
m_content |
| Constructor and Description |
|---|
CommentTemplate()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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
|
Template |
getParent()
get the direct parent of this element.
|
void |
setContent(java.util.List content)
set the content for this Template
|
void |
setParent(Template t)
set the direct parent of this element
|
void |
write(java.io.PrintWriter writer,
int indent)
write the template information to the PrintWriter at the given
indention.
|
public void addImport(java.lang.String name)
public Template getParent()
This can be the class, method, try element or loop elements
public void setParent(Template t)
The parent can be the class, method, try element or loop elements
public void write(java.io.PrintWriter writer,
int indent)
Indention is multiplied by 4 to supply the spaces
for the 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 List will either contain Strings or other ContentTemplates
public void setContent(java.util.List content)
The List should contain either contain Strings or other ContentTemplates
content - 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 List.