public abstract class AbstractGenerator extends java.lang.Object implements ProgramGenerator
| Modifier and Type | Field and Description |
|---|---|
static int |
INDENT_SPACES
Default number of indent spaces.
|
| Constructor and Description |
|---|
AbstractGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addBreak()
Add a line break;
|
void |
addInclude(java.lang.String str)
Add an include.
|
void |
addLine(java.lang.String line)
Add a line of code, indent proper.
|
void |
addToBeginning(java.lang.String str)
Add to the beginning of the file.
|
java.lang.String |
getContents()
Get the contents.
|
java.util.Set<java.lang.String> |
getIncludes() |
void |
indentLine(java.lang.String line)
Indent a line.
|
void |
unIndentLine(java.lang.String line)
Unindent and then add this line.
|
void |
writeContents(java.io.File targetFile)
Write the contents to the specified file.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgeneratepublic static final int INDENT_SPACES
public void addBreak()
public void addInclude(java.lang.String str)
str - The include to add.public void addLine(java.lang.String line)
line - The line of code to add.public void addToBeginning(java.lang.String str)
str - the string to insertpublic java.lang.String getContents()
getContents in interface LanguageSpecificGeneratorpublic java.util.Set<java.lang.String> getIncludes()
public void indentLine(java.lang.String line)
line - The line to indent.public void unIndentLine(java.lang.String line)
line - The line to add.public void writeContents(java.io.File targetFile)
writeContents in interface LanguageSpecificGeneratortargetFile - the output file