Package org.bson

Class AbstractBsonReader.Context

Direct Known Subclasses:
BsonBinaryReader.Context, BsonDocumentReader.Context, JsonReader.Context
Enclosing class:

protected abstract class AbstractBsonReader.Context extends Object
The context for the reader. Records the parent context, creating a bread crumb trail to trace back up to the root context of the reader. Also records the BsonContextType, indicating whether the reader is reading a document, array, or other complex sub-structure.
  • Constructor Details

    • Context

      protected Context(AbstractBsonReader.Context parentContext, BsonContextType contextType)
      Creates a new instance.
      parentContext - a possibly null value for the context that came before this one
      contextType - the type of this context
  • Method Details

    • getParentContext

      protected AbstractBsonReader.Context getParentContext()
      Returns the parent context. Allows users of this context object to transition to this parent context.
      the context that came before this one
    • getContextType

      protected BsonContextType getContextType()
      Return the type of this context.
      the context type.