Modifier and Type | Field and Description |
---|---|
protected com.fasterxml.jackson.core.JsonGenerator |
generator |
Modifier and Type | Method and Description |
---|---|
void |
close()
Finalize the current structure.
|
static Encoder |
create(com.fasterxml.jackson.core.JsonGenerator generator) |
java.lang.String |
currentPath()
Return an analysis of the current path.
|
Encoder |
encodeArray(io.micronaut.core.type.Argument<?> type)
Encodes an array.
|
void |
encodeBigDecimal(java.math.BigDecimal value)
Encode a BigDecimal.
|
void |
encodeBigInteger(java.math.BigInteger value)
Encode a BigInteger.
|
void |
encodeBoolean(boolean value)
Encode a boolean.
|
void |
encodeByte(byte value)
Encode a byte.
|
void |
encodeChar(char value)
Encode a char.
|
void |
encodeDouble(double value)
Encode a double.
|
void |
encodeFloat(float value)
Encode a float.
|
void |
encodeInt(int value)
Encode an int.
|
void |
encodeKey(java.lang.String key)
Encode a key.
|
void |
encodeLong(long value)
Encode a long.
|
void |
encodeNull()
Encode
null . |
Encoder |
encodeObject(io.micronaut.core.type.Argument<?> type)
Encodes an object.
|
void |
encodeShort(short value)
Encode a short.
|
void |
encodeString(java.lang.String value)
Encode a string.
|
void |
finishStructure()
Finalize a previously created structure, like an array or object.
|
protected abstract void |
finishStructureToken() |
public static Encoder create(@NonNull com.fasterxml.jackson.core.JsonGenerator generator)
public final Encoder encodeArray(io.micronaut.core.type.Argument<?> type) throws java.io.IOException
Encoder
encodeArray
in interface Encoder
type
- The array type, never null
null
java.io.IOException
- if an error occurspublic final Encoder encodeObject(io.micronaut.core.type.Argument<?> type) throws java.io.IOException
Encoder
encodeObject
in interface Encoder
type
- The object type, never null
null
java.io.IOException
- if an error occurspublic final void finishStructure() throws java.io.IOException
Encoder
finishStructure
in interface Encoder
java.io.IOException
- If an error occurspublic final void close() throws java.io.IOException
Encoder
Encoder.finishStructure()
.protected abstract void finishStructureToken() throws java.io.IOException
java.io.IOException
public java.lang.String currentPath()
Encoder
currentPath
in interface Encoder
public final void encodeKey(@NonNull java.lang.String key) throws java.io.IOException
Encoder
public final void encodeString(@NonNull java.lang.String value) throws java.io.IOException
Encoder
encodeString
in interface Encoder
value
- The string, never null
java.io.IOException
- If an error occurspublic final void encodeBoolean(boolean value) throws java.io.IOException
Encoder
encodeBoolean
in interface Encoder
value
- The booleanjava.io.IOException
- If an error occurspublic final void encodeByte(byte value) throws java.io.IOException
Encoder
encodeByte
in interface Encoder
value
- The bytejava.io.IOException
- If an error occurspublic final void encodeShort(short value) throws java.io.IOException
Encoder
encodeShort
in interface Encoder
value
- The shortjava.io.IOException
- If an error occurspublic final void encodeChar(char value) throws java.io.IOException
Encoder
encodeChar
in interface Encoder
value
- The charjava.io.IOException
- If an error occurspublic final void encodeInt(int value) throws java.io.IOException
Encoder
public final void encodeLong(long value) throws java.io.IOException
Encoder
encodeLong
in interface Encoder
value
- The longjava.io.IOException
- If an error occurspublic final void encodeFloat(float value) throws java.io.IOException
Encoder
encodeFloat
in interface Encoder
value
- The floatjava.io.IOException
- If an error occurspublic final void encodeDouble(double value) throws java.io.IOException
Encoder
encodeDouble
in interface Encoder
value
- The doublejava.io.IOException
- If an error occurspublic final void encodeBigInteger(@NonNull java.math.BigInteger value) throws java.io.IOException
Encoder
encodeBigInteger
in interface Encoder
value
- The BigInteger, never null
java.io.IOException
- If an error occurspublic final void encodeBigDecimal(@NonNull java.math.BigDecimal value) throws java.io.IOException
Encoder
encodeBigDecimal
in interface Encoder
value
- The BigDecimal, never null
java.io.IOException
- If an error occurspublic final void encodeNull() throws java.io.IOException
Encoder
null
.encodeNull
in interface Encoder
java.io.IOException
- If an error occurs