|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.encog.app.generate.generators.AbstractGenerator
public abstract class AbstractGenerator
Abstract class that forms the foundation of most code generators. This class allows for includes and code indentation.
Field Summary | |
---|---|
static int |
INDENT_SPACES
Default number of indent spaces. |
Constructor Summary | |
---|---|
AbstractGenerator()
|
Method Summary | |
---|---|
void |
addBreak()
Add a line break; |
void |
addInclude(String str)
Add an include. |
void |
addLine(String line)
Add a line of code, indent proper. |
void |
addToBeginning(String str)
Add to the beginning of the file. |
String |
getContents()
Get the contents. |
Set<String> |
getIncludes()
|
void |
indentLine(String line)
Indent a line. |
void |
unIndentLine(String line)
Unindent and then add this line. |
void |
writeContents(File targetFile)
Write the contents to the specified file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.encog.app.generate.generators.ProgramGenerator |
---|
generate |
Field Detail |
---|
public static final int INDENT_SPACES
Constructor Detail |
---|
public AbstractGenerator()
Method Detail |
---|
public void addBreak()
public void addInclude(String str)
str
- The include to add.public void addLine(String line)
line
- The line of code to add.public void addToBeginning(String str)
str
- public String getContents()
getContents
in interface LanguageSpecificGenerator
public Set<String> getIncludes()
public void indentLine(String line)
line
- The line to indent.public void unIndentLine(String line)
line
- The line to add.public void writeContents(File targetFile)
writeContents
in interface LanguageSpecificGenerator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |