net.sf.farrago.catalog.codegen
Class FactoryGen.ForkWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.PrintWriter
          extended by net.sf.farrago.catalog.codegen.FactoryGen.ForkWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable
Enclosing class:
FactoryGen

private static class FactoryGen.ForkWriter
extends PrintWriter

Writer which takes two underlying writers, and automatically writes method bodies to one, and method prototypes to the other.


Field Summary
private  boolean inMethod
           
private  PrintWriter pwClass
           
private  PrintWriter pwInterface
           
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected FactoryGen.ForkWriter(PrintWriter pwInterface, PrintWriter pwClass)
           
 
Method Summary
 void flush()
           
 void print(String x)
           
 void println(String x)
           
 
Methods inherited from class java.io.PrintWriter
append, append, append, checkError, close, format, format, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inMethod

private boolean inMethod

pwInterface

private final PrintWriter pwInterface

pwClass

private final PrintWriter pwClass
Constructor Detail

FactoryGen.ForkWriter

protected FactoryGen.ForkWriter(PrintWriter pwInterface,
                                PrintWriter pwClass)
Method Detail

print

public void print(String x)
Overrides:
print in class PrintWriter

println

public void println(String x)
Overrides:
println in class PrintWriter

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush in class PrintWriter