polyglot.util
Class CodeWriter
java.lang.Object
polyglot.util.CodeWriter
- Direct Known Subclasses:
- StringPrettyPrinter.StringCodeWriter
public class CodeWriter
- extends java.lang.Object
Constructor Summary |
CodeWriter(java.io.OutputStream o,
int width_)
|
CodeWriter(java.io.PrintWriter o,
int width_)
|
CodeWriter(java.io.Writer o,
int width_)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
input
protected polyglot.util.BlockItem input
current
protected polyglot.util.BlockItem current
top
protected static polyglot.util.Item top
output
protected java.io.PrintWriter output
width
protected int width
format_calls
protected static int format_calls
debug
public static final boolean debug
- See Also:
- Constant Field Values
showInput
public static final boolean showInput
- See Also:
- Constant Field Values
visualize
public static final boolean visualize
- See Also:
- Constant Field Values
precompute
public static final boolean precompute
- See Also:
- Constant Field Values
trace_indent
protected int trace_indent
CodeWriter
public CodeWriter(java.io.OutputStream o,
int width_)
CodeWriter
public CodeWriter(java.io.PrintWriter o,
int width_)
CodeWriter
public CodeWriter(java.io.Writer o,
int width_)
write
public void write(java.lang.String s)
write
public void write(java.lang.String s,
int length)
begin
public void begin(int n)
end
public void end()
allowBreak
public void allowBreak(int n)
allowBreak
public void allowBreak(int n,
java.lang.String alt)
allowBreak
public void allowBreak(int n,
int level,
java.lang.String alt,
int altlen)
unifiedBreak
public void unifiedBreak(int n,
int level,
java.lang.String alt,
int altlen)
newline
public void newline()
newline
public void newline(int n,
int level)
newline
public void newline(int n)
flush
public boolean flush()
throws java.io.IOException
- Throws:
java.io.IOException
flush
public boolean flush(boolean format)
throws java.io.IOException
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Throws:
java.io.IOException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object