public class JsonWriter.Context extends AbstractBsonWriter.Context
AbstractBsonWriter.Context
, and additionally providing
settings for the indentation level and whether there are any child elements at this level.Modifier and Type | Field and Description |
---|---|
private boolean |
hasElements |
private java.lang.String |
indentation |
Constructor and Description |
---|
Context(JsonWriter.Context parentContext,
BsonContextType contextType,
java.lang.String indentChars)
Creates a new context.
|
Modifier and Type | Method and Description |
---|---|
JsonWriter.Context |
getParentContext()
Returns the parent context.
|
copy, getContextType
private final java.lang.String indentation
private boolean hasElements
public Context(JsonWriter.Context parentContext, BsonContextType contextType, java.lang.String indentChars)
parentContext
- the parent context that can be used for going back up to the parent levelcontextType
- the type of this contextindentChars
- the String to use for indentation at this level.public JsonWriter.Context getParentContext()
AbstractBsonWriter.Context
getParentContext
in class AbstractBsonWriter.Context