story.scheherazade.prologuer
Class CodeWriter
java.lang.Object
story.scheherazade.prologuer.CodeWriter
public class CodeWriter
- extends java.lang.Object
Class which is designed to create generated code.
Constructor Summary |
CodeWriter(java.io.File file,
java.lang.String className)
Constructor that starts the generated code. |
Method Summary |
void |
close()
|
boolean |
println(java.lang.String line)
|
boolean |
println(java.lang.String line,
boolean postponeRollover)
Write a line of generated code. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_LINES
public static int MAX_LINES
CodeWriter
public CodeWriter(java.io.File file,
java.lang.String className)
throws java.lang.Exception
- Constructor that starts the generated code.
- Throws:
java.lang.Exception
println
public boolean println(java.lang.String line)
throws java.lang.Exception
- Throws:
java.lang.Exception
println
public boolean println(java.lang.String line,
boolean postponeRollover)
throws java.lang.Exception
- Write a line of generated code. Automatically ends one
class and begins another once a certain number of lines is
written. Be sure that all the lines you pass to println()
are therefore not dependent on any other lines, since
previous lines calls might have been written to a different
class.
- Parameters:
postpineRollover
- Avoid rolling over the private class
even if we are over the limit.
Returns whether a new class was created.
- Throws:
java.lang.Exception
close
public void close()
throws java.lang.Exception
- Throws:
java.lang.Exception
Copyright © 2011 David K. Elson. All Rights Reserved.