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
,java.io.Closeable
,java.io.Flushable
,java.lang.AutoCloseable
public final class TreeGenerator extends com.fasterxml.jackson.core.JsonGenerator
AJsonGenerator
that returns tokens as aJsonNode
.- Since:
- 3.1
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
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()
io.micronaut.json.tree.JsonNode
getCompletedValue()
int
getFeatureMask()
com.fasterxml.jackson.core.JsonStreamContext
getOutputContext()
boolean
isClosed()
boolean
isComplete()
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
useDefaultPrettyPrinter()
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, java.io.InputStream data, int dataLength)
void
writeBoolean(boolean state)
void
writeEndArray()
void
writeEndObject()
void
writeFieldName(com.fasterxml.jackson.core.SerializableString name)
void
writeFieldName(java.lang.String name)
void
writeNull()
void
writeNumber(double v)
void
writeNumber(float v)
void
writeNumber(int v)
void
writeNumber(long v)
void
writeNumber(java.lang.String encodedValue)
void
writeNumber(java.math.BigDecimal v)
void
writeNumber(java.math.BigInteger v)
void
writeObject(java.lang.Object pojo)
void
writeRaw(char c)
void
writeRaw(char[] text, int offset, int len)
void
writeRaw(java.lang.String text)
void
writeRaw(java.lang.String text, int offset, int len)
void
writeRawUTF8String(byte[] buffer, int offset, int len)
void
writeRawValue(char[] text, int offset, int len)
void
writeRawValue(java.lang.String text)
void
writeRawValue(java.lang.String text, int offset, int len)
void
writeStartArray()
void
writeStartObject()
void
writeString(char[] buffer, int offset, int len)
void
writeString(com.fasterxml.jackson.core.SerializableString text)
void
writeString(java.lang.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
_copyCurrentContents, _reportError, _reportUnsupportedOperation, _throwInternal, _verifyOffsets, _writeSimpleObject, assignCurrentValue, canOmitFields, canUseSchema, canWriteBinaryNatively, canWriteFormattedNumbers, canWriteObjectId, canWriteTypeId, configure, copyCurrentEvent, copyCurrentStructure, currentValue, getCharacterEscapes, getCurrentValue, getFormatFeatures, getHighestEscapedChar, getOutputBuffered, getOutputTarget, getPrettyPrinter, getSchema, getWriteCapabilities, isEnabled, overrideFormatFeatures, overrideStdFeatures, setCharacterEscapes, setCurrentValue, setHighestNonEscapedChar, setPrettyPrinter, setRootValueSeparator, setSchema, 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 Detail
-
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
@NonNull public io.micronaut.json.tree.JsonNode getCompletedValue()
- Returns:
- The completed node.
- Throws:
java.lang.IllegalStateException
- If there is still data missing. Check withisComplete()
.
-
writeStartArray
public void writeStartArray() throws java.io.IOException
- Specified by:
writeStartArray
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeEndArray
public void writeEndArray() throws java.io.IOException
- Specified by:
writeEndArray
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeStartObject
public void writeStartObject() throws java.io.IOException
- Specified by:
writeStartObject
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeEndObject
public void writeEndObject() throws java.io.IOException
- Specified by:
writeEndObject
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeFieldName
public void writeFieldName(java.lang.String name) throws java.io.IOException
- Specified by:
writeFieldName
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeFieldName
public void writeFieldName(com.fasterxml.jackson.core.SerializableString name) throws java.io.IOException
- Specified by:
writeFieldName
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeString
public void writeString(java.lang.String text) throws java.io.IOException
- Specified by:
writeString
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeString
public void writeString(char[] buffer, int offset, int len) throws java.io.IOException
- Specified by:
writeString
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeString
public void writeString(com.fasterxml.jackson.core.SerializableString text) throws java.io.IOException
- Specified by:
writeString
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRawUTF8String
public void writeRawUTF8String(byte[] buffer, int offset, int len) throws java.io.IOException
- Specified by:
writeRawUTF8String
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeUTF8String
public void writeUTF8String(byte[] buffer, int offset, int len) throws java.io.IOException
- Specified by:
writeUTF8String
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(java.lang.String text) throws java.io.IOException
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(java.lang.String text, int offset, int len) throws java.io.IOException
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(char[] text, int offset, int len) throws java.io.IOException
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(char c) throws java.io.IOException
- Specified by:
writeRaw
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRawValue
public void writeRawValue(java.lang.String text) throws java.io.IOException
- Specified by:
writeRawValue
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRawValue
public void writeRawValue(java.lang.String text, int offset, int len) throws java.io.IOException
- Specified by:
writeRawValue
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeRawValue
public void writeRawValue(char[] text, int offset, int len) throws java.io.IOException
- Specified by:
writeRawValue
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeBinary
public void writeBinary(com.fasterxml.jackson.core.Base64Variant bv, byte[] data, int offset, int len) throws java.io.IOException
- Specified by:
writeBinary
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeBinary
public int writeBinary(com.fasterxml.jackson.core.Base64Variant bv, java.io.InputStream data, int dataLength) throws java.io.IOException
- Specified by:
writeBinary
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(int v) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(long v) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.math.BigInteger v) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(double v) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(float v) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.math.BigDecimal v) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNumber
public void writeNumber(java.lang.String encodedValue) throws java.io.IOException
- Specified by:
writeNumber
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeBoolean
public void writeBoolean(boolean state) throws java.io.IOException
- Specified by:
writeBoolean
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeNull
public void writeNull() throws java.io.IOException
- Specified by:
writeNull
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeObject
public void writeObject(java.lang.Object pojo) throws java.io.IOException
- Specified by:
writeObject
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
writeTree
public void writeTree(com.fasterxml.jackson.core.TreeNode rootNode) throws java.io.IOException
- Specified by:
writeTree
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
isClosed
public boolean isClosed()
- Specified by:
isClosed
in classcom.fasterxml.jackson.core.JsonGenerator
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classcom.fasterxml.jackson.core.JsonGenerator
- Throws:
java.io.IOException
-
-