Class EncoderContext.Builder

java.lang.Object
org.bson.codecs.EncoderContext.Builder
Enclosing class:
EncoderContext

public static final class EncoderContext.Builder extends Object
A builder for EncoderContext instances.
  • Method Details

    • isEncodingCollectibleDocument

      public EncoderContext.Builder isEncodingCollectibleDocument(boolean encodingCollectibleDocument)
      Set to true if the value to be encoded is a document that will be put in a MongoDB collection.
      Parameters:
      encodingCollectibleDocument - true if the value to be encoded is a document that will be put in a MongoDB collection
      Returns:
      this
    • build

      public EncoderContext build()
      Build an instance of EncoderContext.
      Returns:
      the encoder context