public static class Printer.PrinterVisitor extends AbstractValueVisitor
| Modifier and Type | Field and Description |
|---|---|
protected Printer.Options |
myOptions |
protected Appendable |
myOut |
| Constructor and Description |
|---|
PrinterVisitor(Printer.Options options,
Appendable out) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
defaultVisit(IonValue value)
Default visitation behavior, called by all
visit methods
in AbstractValueVisitor. |
void |
visit(IonBlob value) |
void |
visit(IonBool value) |
void |
visit(IonClob value) |
void |
visit(IonDatagram value) |
void |
visit(IonDecimal value) |
void |
visit(IonFloat value) |
void |
visit(IonInt value) |
void |
visit(IonList value) |
void |
visit(IonNull value) |
void |
visit(IonSexp value) |
void |
visit(IonString value) |
void |
visit(IonStruct value) |
void |
visit(IonSymbol value) |
void |
visit(IonTimestamp value) |
void |
writeAnnotations(IonValue value) |
protected void |
writeChild(IonValue value,
boolean quoteOperators)
Recurse down into a container, we push the current value of
myQuoteOperators onto the stack and replace it with
the given value. |
void |
writeNull(String type) |
void |
writeSequenceContent(IonSequence value,
boolean quoteOperators,
char open,
char separator,
char close) |
void |
writeString(String text) |
void |
writeSymbol(String text) |
void |
writeSymbolToken(SymbolToken sym) |
protected final Printer.Options myOptions
protected final Appendable myOut
public PrinterVisitor(Printer.Options options, Appendable out)
protected void writeChild(IonValue value, boolean quoteOperators) throws Exception
myQuoteOperators onto the stack and replace it with
the given value.value - quoteOperators - replaces the current value of
myQuoteOperators during the recursive visitation.Exception - propagated from visitation of value.NullPointerException - if value is null.public void writeAnnotations(IonValue value) throws IOException
IOExceptionpublic void writeNull(String type) throws IOException
IOExceptionpublic void writeSequenceContent(IonSequence value, boolean quoteOperators, char open, char separator, char close) throws IOException, Exception
IOExceptionExceptionpublic void writeSymbolToken(SymbolToken sym) throws IOException
IOExceptionpublic void writeSymbol(String text) throws IOException
IOExceptionpublic void writeString(String text) throws IOException
text - may be nullIOExceptionprotected void defaultVisit(IonValue value)
AbstractValueVisitorvisit methods
in AbstractValueVisitor. Subclasses should override this unless
they override all visit methods.
This implementation always throws UnsupportedOperationException.
defaultVisit in class AbstractValueVisitorvalue - the value to visit.public void visit(IonBlob value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonBool value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonClob value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonDatagram value) throws IOException, Exception
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionExceptionpublic void visit(IonDecimal value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonFloat value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonInt value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonList value) throws IOException, Exception
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionExceptionpublic void visit(IonNull value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonSexp value) throws IOException, Exception
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionExceptionpublic void visit(IonString value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonStruct value) throws IOException, Exception
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionExceptionpublic void visit(IonSymbol value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOExceptionpublic void visit(IonTimestamp value) throws IOException
visit in interface ValueVisitorvisit in class AbstractValueVisitorIOException