Package org.bson.codecs
Class EncoderContext
- java.lang.Object
-
- org.bson.codecs.EncoderContext
-
@Deprecated(since="2022-10-31") public final class EncoderContext extends java.lang.Object
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.The context for encoding values to BSON.- Since:
- 3.0
- See Also:
Encoder
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EncoderContext.Builder
Deprecated.Usage of this API is not supported in AEM as a Cloud Service.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static EncoderContext.Builder
builder()
Deprecated.Create a builder.<T> void
encodeWithChildContext(Encoder<T> encoder, BsonWriter writer, T value)
Deprecated.Creates a child context based on this and serializes the value with it to the writer.EncoderContext
getChildContext()
Deprecated.Gets a child context based on this.boolean
isEncodingCollectibleDocument()
Deprecated.Returns true if the the value to be encoded is a document that will be put in a MongoDB collection.
-
-
-
Method Detail
-
builder
public static EncoderContext.Builder builder()
Deprecated.Create a builder.- Returns:
- the builder
-
isEncodingCollectibleDocument
public boolean isEncodingCollectibleDocument()
Deprecated.Returns true if the the value to be encoded is a document that will be put in a MongoDB collection. Encoders for such documents might choose to act differently when encoding such as documents, e.g. by re-ordering the fields in some way (like encoding the _id field first).- Returns:
- true if the value to be encoded is a document that will be put in a MongoDB collection
-
encodeWithChildContext
public <T> void encodeWithChildContext(Encoder<T> encoder, BsonWriter writer, T value)
Deprecated.Creates a child context based on this and serializes the value with it to the writer.- Type Parameters:
T
- the type of the value- Parameters:
encoder
- the encoder to encode value withwriter
- the writer to encode tovalue
- the value to encode
-
getChildContext
public EncoderContext getChildContext()
Deprecated.Gets a child context based on this.- Returns:
- the child context
-
-