nl.tudelft.tbm.eeni.owl2java.formatter
Class CodeFormattingWriter

java.lang.Object
  extended by java.io.Writer
      extended by java.io.StringWriter
          extended by nl.tudelft.tbm.eeni.owl2java.formatter.CodeFormattingWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class CodeFormattingWriter
extends StringWriter

Stream writer that formats source code


Constructor Summary
CodeFormattingWriter(Writer destination)
          Creates a new code-formatting wrapper with default formatter settings
CodeFormattingWriter(Writer destination, CodeFormatter formatter)
          Creates a new code-formatting wrapper, reusing an existing code formatter instance
CodeFormattingWriter(Writer destination, Properties formatterSettings)
          Creates a new code-formatting wrapper with specified formatter settings; if formatterOptions is null, use default formatter settings
 
Method Summary
 void close()
          Formats the contents of the string buffer, then flushes
 void flush()
          Flush is ignored by formattedWriter
 
Methods inherited from class java.io.StringWriter
append, append, append, getBuffer, toString, write, write, write, write
 
Methods inherited from class java.io.Writer
write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CodeFormattingWriter

public CodeFormattingWriter(Writer destination)
Creates a new code-formatting wrapper with default formatter settings


CodeFormattingWriter

public CodeFormattingWriter(Writer destination,
                            Properties formatterSettings)
Creates a new code-formatting wrapper with specified formatter settings; if formatterOptions is null, use default formatter settings


CodeFormattingWriter

public CodeFormattingWriter(Writer destination,
                            CodeFormatter formatter)
Creates a new code-formatting wrapper, reusing an existing code formatter instance

Method Detail

close

public void close()
           throws IOException
Formats the contents of the string buffer, then flushes

Specified by:
close in interface Closeable
Overrides:
close in class StringWriter
Throws:
IOException
See Also:
Writer.close()

flush

public void flush()
Flush is ignored by formattedWriter

Specified by:
flush in interface Flushable
Overrides:
flush in class StringWriter
See Also:
Writer.flush()


Copyright © 2011. All Rights Reserved.