Constructor and Description |
---|
BsonWriterEncoder(org.bson.BsonWriter bsonWriter) |
Modifier and Type | Method and Description |
---|---|
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 |
encodeDecimal128(org.bson.types.Decimal128 value) |
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 |
encodeObjectId(org.bson.types.ObjectId value) |
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.
|
org.bson.BsonWriter |
getBsonWriter() |
public Encoder encodeArray(io.micronaut.core.type.Argument<?> type)
Encoder
encodeArray
in interface Encoder
type
- The array type, never null
null
public Encoder encodeObject(io.micronaut.core.type.Argument<?> type)
Encoder
encodeObject
in interface Encoder
type
- The object type, never null
null
public void finishStructure()
Encoder
finishStructure
in interface Encoder
public void encodeKey(java.lang.String key)
Encoder
public void encodeString(java.lang.String value)
Encoder
encodeString
in interface Encoder
value
- The string, never null
public void encodeBoolean(boolean value)
Encoder
encodeBoolean
in interface Encoder
value
- The booleanpublic void encodeByte(byte value)
Encoder
encodeByte
in interface Encoder
value
- The bytepublic void encodeShort(short value)
Encoder
encodeShort
in interface Encoder
value
- The shortpublic void encodeChar(char value)
Encoder
encodeChar
in interface Encoder
value
- The charpublic void encodeInt(int value)
Encoder
public void encodeLong(long value)
Encoder
encodeLong
in interface Encoder
value
- The longpublic void encodeFloat(float value)
Encoder
encodeFloat
in interface Encoder
value
- The floatpublic void encodeDouble(double value)
Encoder
encodeDouble
in interface Encoder
value
- The doublepublic void encodeBigInteger(java.math.BigInteger value)
Encoder
encodeBigInteger
in interface Encoder
value
- The BigInteger, never null
public void encodeBigDecimal(java.math.BigDecimal value)
Encoder
encodeBigDecimal
in interface Encoder
value
- The BigDecimal, never null
public void encodeNull()
Encoder
null
.encodeNull
in interface Encoder
@NonNull public java.lang.String currentPath()
Encoder
currentPath
in interface Encoder
public void encodeDecimal128(org.bson.types.Decimal128 value)
public void encodeObjectId(org.bson.types.ObjectId value)
public org.bson.BsonWriter getBsonWriter()