Package io.micronaut.jackson.core.tree
Class TreeGenerator
java.lang.Object
com.fasterxml.jackson.core.JsonGenerator
io.micronaut.jackson.core.tree.TreeGenerator
- All Implemented Interfaces:
com.fasterxml.jackson.core.Versioned
,Closeable
,Flushable
,AutoCloseable
public final class TreeGenerator
extends com.fasterxml.jackson.core.JsonGenerator
A
JsonGenerator
that returns tokens as a JsonNode
.- Since:
- 3.1
- Author:
- Jonas Konrad
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.core.JsonGenerator
com.fasterxml.jackson.core.JsonGenerator.Feature
-
Field Summary
Fields inherited from class com.fasterxml.jackson.core.JsonGenerator
_cfgPrettyPrinter, DEFAULT_BINARY_WRITE_CAPABILITIES, DEFAULT_TEXTUAL_WRITE_CAPABILITIES, DEFAULT_WRITE_CAPABILITIES
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
com.fasterxml.jackson.core.JsonGenerator
disable
(com.fasterxml.jackson.core.JsonGenerator.Feature f) com.fasterxml.jackson.core.JsonGenerator
enable
(com.fasterxml.jackson.core.JsonGenerator.Feature f) void
flush()
com.fasterxml.jackson.core.ObjectCodec
getCodec()
int
com.fasterxml.jackson.core.JsonStreamContext
boolean
isClosed()
boolean
boolean
isEnabled
(com.fasterxml.jackson.core.JsonGenerator.Feature f) com.fasterxml.jackson.core.JsonGenerator
setCodec
(com.fasterxml.jackson.core.ObjectCodec oc) com.fasterxml.jackson.core.JsonGenerator
setFeatureMask
(int values) com.fasterxml.jackson.core.JsonGenerator
com.fasterxml.jackson.core.Version
version()
void
writeBinary
(com.fasterxml.jackson.core.Base64Variant bv, byte[] data, int offset, int len) int
writeBinary
(com.fasterxml.jackson.core.Base64Variant bv, InputStream data, int dataLength) void
writeBoolean
(boolean state) void
void
void
writeFieldName
(com.fasterxml.jackson.core.SerializableString name) void
writeFieldName
(String name) void
void
writeNumber
(double v) void
writeNumber
(float v) void
writeNumber
(int v) void
writeNumber
(long v) void
writeNumber
(String encodedValue) void
void
void
writeObject
(Object pojo) void
writeRaw
(char c) void
writeRaw
(char[] text, int offset, int len) void
void
void
writeRawUTF8String
(byte[] buffer, int offset, int len) void
writeRawValue
(char[] text, int offset, int len) void
writeRawValue
(String text) void
writeRawValue
(String text, int offset, int len) void
void
void
writeString
(char[] buffer, int offset, int len) void
writeString
(com.fasterxml.jackson.core.SerializableString text) void
writeString
(String text) void
writeTree
(com.fasterxml.jackson.core.TreeNode rootNode) void
writeUTF8String
(byte[] buffer, int offset, int len) Methods inherited from class com.fasterxml.jackson.core.JsonGenerator
_constructWriteException, _constructWriteException, _constructWriteException, _constructWriteException, _copyCurrentContents, _copyCurrentFloatValue, _copyCurrentFloatValueExact, _copyCurrentIntValue, _copyCurrentStringValue, _reportError, _reportUnsupportedOperation, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, assignCurrentValue, canOmitFields, canUseSchema, canWriteBinaryNatively, canWriteFormattedNumbers, canWriteObjectId, canWriteTypeId, configure, copyCurrentEvent, copyCurrentEventExact, copyCurrentStructure, currentValue, getCharacterEscapes, getCurrentValue, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, getWriteCapabilities, isEnabled, overrideFormatFeatures, overrideStdFeatures, setCharacterEscapes, setCurrentValue, setHighestNonEscapedChar, setPrettyPrinter, setRootValueSeparator, setSchema, streamWriteConstraints, writeArray, writeArray, writeArray, writeArray, writeArrayFieldStart, writeBinary, writeBinary, writeBinary, writeBinaryField, writeBooleanField, writeEmbeddedObject, writeFieldId, writeNullField, writeNumber, writeNumber, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeNumberField, writeObjectField, writeObjectFieldStart, writeObjectId, writeObjectRef, writeOmittedField, writePOJO, writePOJOField, writeRaw, writeRawValue, writeStartArray, writeStartArray, writeStartArray, writeStartObject, writeStartObject, writeString, writeStringField, writeTypeId, writeTypePrefix, writeTypeSuffix
-
Method Details
-
setCodec
public com.fasterxml.jackson.core.JsonGenerator setCodec(com.fasterxml.jackson.core.ObjectCodec oc) - Specified by:
setCodec
in classcom.fasterxml.jackson.core.JsonGenerator
-
getCodec
public com.fasterxml.jackson.core.ObjectCodec getCodec()- Specified by:
getCodec
in classcom.fasterxml.jackson.core.JsonGenerator
-
version
public com.fasterxml.jackson.core.Version version()- Specified by:
version
in interfacecom.fasterxml.jackson.core.Versioned
- Specified by:
version
in classcom.fasterxml.jackson.core.JsonGenerator
-
getOutputContext
public com.fasterxml.jackson.core.JsonStreamContext getOutputContext()- Specified by:
getOutputContext
in classcom.fasterxml.jackson.core.JsonGenerator
-
enable
public com.fasterxml.jackson.core.JsonGenerator enable(com.fasterxml.jackson.core.JsonGenerator.Feature f) - Specified by:
enable
in classcom.fasterxml.jackson.core.JsonGenerator
-
disable
public com.fasterxml.jackson.core.JsonGenerator disable(com.fasterxml.jackson.core.JsonGenerator.Feature f) - Specified by:
disable
in classcom.fasterxml.jackson.core.JsonGenerator
-
isEnabled
public boolean isEnabled(com.fasterxml.jackson.core.JsonGenerator.Feature f) - Specified by:
isEnabled
in classcom.fasterxml.jackson.core.JsonGenerator
-
getFeatureMask
public int getFeatureMask()- Specified by:
getFeatureMask
in classcom.fasterxml.jackson.core.JsonGenerator
-
setFeatureMask
public com.fasterxml.jackson.core.JsonGenerator setFeatureMask(int values) - Specified by:
setFeatureMask
in classcom.fasterxml.jackson.core.JsonGenerator
-
useDefaultPrettyPrinter
public com.fasterxml.jackson.core.JsonGenerator useDefaultPrettyPrinter()- Specified by:
useDefaultPrettyPrinter
in classcom.fasterxml.jackson.core.JsonGenerator
-
isComplete
public boolean isComplete()- Returns:
- Whether this generator has visited a complete node.
-
getCompletedValue
- Returns:
- The completed node.
- Throws:
IllegalStateException
- If there is still data missing. Check withisComplete()
.
-
writeStartArray
public void writeStartArray()- Specified by:
writeStartArray
in classcom.fasterxml.jackson.core.JsonGenerator
-
writeEndArray
- Specified by:
writeEndArray
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeStartObject
- Specified by:
writeStartObject
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeEndObject
- Specified by:
writeEndObject
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeFieldName
- Specified by:
writeFieldName
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeFieldName
- Specified by:
writeFieldName
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeString
- Specified by:
writeString
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeString
- Specified by:
writeString
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeString
- Specified by:
writeString
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRawUTF8String
- Specified by:
writeRawUTF8String
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeUTF8String
- Specified by:
writeUTF8String
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRaw
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRaw
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRaw
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRaw
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRawValue
- Specified by:
writeRawValue
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRawValue
- Specified by:
writeRawValue
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeRawValue
- Specified by:
writeRawValue
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeBinary
public void writeBinary(com.fasterxml.jackson.core.Base64Variant bv, byte[] data, int offset, int len) throws IOException - Specified by:
writeBinary
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeBinary
public int writeBinary(com.fasterxml.jackson.core.Base64Variant bv, InputStream data, int dataLength) throws IOException - Specified by:
writeBinary
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNumber
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeBoolean
- Specified by:
writeBoolean
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeNull
- Specified by:
writeNull
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeObject
- Specified by:
writeObject
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
writeTree
- Specified by:
writeTree
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-
isClosed
public boolean isClosed()- Specified by:
isClosed
in classcom.fasterxml.jackson.core.JsonGenerator
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
IOException
-