ActualAppendable - The actual Appendable type.Result - The result type.public abstract class AbstractAppendingJavaTextJsonHandler<ActualAppendable extends Appendable,Result> extends IdleJsonHandler<Result>
AbstractAppendingJavaTextJsonHandler is a JsonHandler that
appends the handled JSON document as a text, that mimics the
Object.toString() behavior of Javas collection classes, to a given
Appendable.| Constructor and Description |
|---|
AbstractAppendingJavaTextJsonHandler(ActualAppendable appendable,
Indentation indentation)
Creates a new
AbstractAppendingJavaTextJsonHandler. |
| Modifier and Type | Method and Description |
|---|---|
protected ActualAppendable |
getAppendable()
Returns the
Appendable this
AbstractAppendingJavaTextJsonHandler has been created with. |
void |
onArrayBegin()
Called when the parsing of a JSON array started.
|
void |
onArrayEnd()
Called when the parsing of a JSON array ended.
|
void |
onBoolean(boolean value)
Called when the parsing of a JSON object encountered a JSON boolean.
|
void |
onDocumentBegin()
Called when the parsing of a JSON document started.
|
void |
onDocumentEnd()
Called when the parsing of a JSON document ended.
|
void |
onDouble(double value)
Called when the parsing of a JSON object encountered a JSON number, that
represents a decimal value.
|
void |
onLong(long value)
Called when the parsing of a JSON object encountered a JSON number, that
represents an integer value.
|
void |
onName(String name)
Called when the parsing of a JSON object encountered the name for the
next JSON value.
|
void |
onNext()
Called when the parsing of a JSON array or JSON object encountered
another element.
|
void |
onNull()
Called when the parsing of a JSON object encountered a JSON null.
|
void |
onObjectBegin()
Called when the parsing of a JSON object started.
|
void |
onObjectEnd()
Called when the parsing of a JSON object ended.
|
void |
onString(String value)
Called when the parsing of a JSON object encountered a JSON string.
|
checkDouble, checkName, checkString, getResultpublic AbstractAppendingJavaTextJsonHandler(ActualAppendable appendable, Indentation indentation)
AbstractAppendingJavaTextJsonHandler.appendable - The Appendable to be used.indentation - The Indentation to be used.protected ActualAppendable getAppendable()
Appendable this
AbstractAppendingJavaTextJsonHandler has been created with.Appendable this
AbstractAppendingJavaTextJsonHandler has been created
with.public final void onDocumentBegin()
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onDocumentBegin in interface JsonHandler<Result>onDocumentBegin in class IdleJsonHandler<Result>public final void onDocumentEnd()
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onDocumentEnd in interface JsonHandler<Result>onDocumentEnd in class IdleJsonHandler<Result>public final void onArrayBegin()
throws JsonException
JsonHandlerend must eventually be called.
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onArrayBegin in interface JsonHandler<Result>onArrayBegin in class IdleJsonHandler<Result>JsonException - If the handling failed.public final void onArrayEnd()
throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onArrayEnd in interface JsonHandler<Result>onArrayEnd in class IdleJsonHandler<Result>JsonException - If the handling failed.public final void onObjectBegin()
throws JsonException
JsonHandlerend must eventually be called.
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onObjectBegin in interface JsonHandler<Result>onObjectBegin in class IdleJsonHandler<Result>JsonException - If the handling failed.public final void onObjectEnd()
throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onObjectEnd in interface JsonHandler<Result>onObjectEnd in class IdleJsonHandler<Result>JsonException - If the handling failed.public final void onName(String name) throws JsonIndexException, JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onName in interface JsonHandler<Result>onName in class IdleJsonHandler<Result>name - The name for the next JSON value.JsonIndexException - If the given value is null.JsonException - If the handling failed.public final void onNext()
throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onNext in interface JsonHandler<Result>onNext in class IdleJsonHandler<Result>JsonException - If the handling failed.public final void onNull()
throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onNull in interface JsonHandler<Result>onNull in class IdleJsonHandler<Result>JsonException - If the handling failed.public final void onBoolean(boolean value)
throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onBoolean in interface JsonHandler<Result>onBoolean in class IdleJsonHandler<Result>value - The value of the JSON boolean.JsonException - If the handling failed.public final void onLong(long value)
throws JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onLong in interface JsonHandler<Result>onLong in class IdleJsonHandler<Result>value - The value of the JSON number.JsonException - If the handling failed.public final void onDouble(double value)
throws JsonValueException,
JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onDouble in interface JsonHandler<Result>onDouble in class IdleJsonHandler<Result>value - The value of the JSON number.JsonValueException - If the given value is not a
number or infinite.JsonException - If the handling failed.public final void onString(String value) throws JsonValueException, JsonException
JsonHandler
Implementers should catch any exception that isn't a
JsonException and wrap them in an appropriate
JsonException (e.g. a JsonHandlingException).
onString in interface JsonHandler<Result>onString in class IdleJsonHandler<Result>value - The value of the JSON string.JsonValueException - If the given value is null.JsonException - If the handling failed.Copyright © 2016 Markenwerk – Gesellschaft für markenbildende Maßnahmen mbH. All rights reserved.