BsonBinaryWriter.Context
, JsonWriter.Context
public class AbstractBsonWriter.Context extends Object
BsonContextType
, indicating whether the writer is reading a document, array, or other
complex sub-structure.Constructor | Description |
---|---|
Context(AbstractBsonWriter.Context from) |
Creates a new instance, copying values from an existing context.
|
Context(AbstractBsonWriter.Context parentContext,
BsonContextType contextType) |
Creates a new instance.
|
Modifier and Type | Method | Description |
---|---|---|
AbstractBsonWriter.Context |
copy() |
Copies the values from this
Context into a new instance. |
BsonContextType |
getContextType() |
Gets the current context type.
|
AbstractBsonWriter.Context |
getParentContext() |
Returns the parent context.
|
public Context(AbstractBsonWriter.Context from)
from
- the Context
to copy values frompublic Context(AbstractBsonWriter.Context parentContext, BsonContextType contextType)
parentContext
- the context of the parent nodecontextType
- the context type.public AbstractBsonWriter.Context getParentContext()
public BsonContextType getContextType()
public AbstractBsonWriter.Context copy()
Context
into a new instance.