public class CodeWriterSExpPrinter extends java.lang.Object implements SExpPrinter
CodeWriter
.Constructor and Description |
---|
CodeWriterSExpPrinter(polyglot.util.CodeWriter writer)
Constructs a new SExpPrinter instance that prints programs
using the given
CodeWriter . |
CodeWriterSExpPrinter(java.io.OutputStream o)
Deprecated.
|
CodeWriterSExpPrinter(java.io.PrintWriter w)
Constructs a new SExpPrinter instance that prints programs
using the given writer.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Flushes and closes both this printer and any underlying
output stream to which it is attached.
|
void |
endList()
Prints the close parenthesis of an S-expression list.
|
void |
flush()
Flushes all formatted text to the underlying writer.
|
void |
printAtom(java.lang.String atom)
Prints an atom.
|
protected void |
startElement() |
protected void |
startEveryList() |
void |
startList()
Prints the open parenthesis of an S-expression list.
|
void |
startUnifiedList()
Prints the open parenthesis of an S-expression list,
and requires that if a line break is required to separate any two
elements of this list, then all elements of this list must be separated
by a line break (optional operation).
|
public CodeWriterSExpPrinter(polyglot.util.CodeWriter writer)
CodeWriter
.writer
- the CodeWriter
to print topublic CodeWriterSExpPrinter(java.io.PrintWriter w)
w
- the writer to write to@Deprecated public CodeWriterSExpPrinter(java.io.OutputStream o)
o
- the output stream to print topublic void printAtom(java.lang.String atom)
SExpPrinter
printAtom
in interface SExpPrinter
atom
- the atom to printpublic void startList()
SExpPrinter
startList
in interface SExpPrinter
public void startUnifiedList()
SExpPrinter
startUnifiedList
in interface SExpPrinter
protected void startEveryList()
public void endList()
SExpPrinter
endList
in interface SExpPrinter
protected void startElement()
public void flush()
SExpPrinter
flush
in interface SExpPrinter
public void close()
SExpPrinter
close
in interface SExpPrinter
close
in interface java.lang.AutoCloseable