Package org.bson.json
Class JsonWriter.Context
java.lang.Object
org.bson.AbstractBsonWriter.Context
org.bson.json.JsonWriter.Context
- Enclosing class:
- JsonWriter
The context for the writer, inheriting all the values from
AbstractBsonWriter.Context, and additionally providing
settings for the indentation level and whether there are any child elements at this level.-
Constructor Summary
ConstructorsConstructorDescriptionContext(JsonWriter.Context parentContext, BsonContextType contextType) Creates a new context. -
Method Summary
Modifier and TypeMethodDescriptionReturns the parent context.Methods inherited from class org.bson.AbstractBsonWriter.Context
copy, getContextType
-
Constructor Details
-
Context
Creates a new context.- Parameters:
parentContext- the parent context that can be used for going back up to the parent levelcontextType- the type of this context
-
-
Method Details
-
getParentContext
Description copied from class:AbstractBsonWriter.ContextReturns the parent context. Allows users of this context object to transition to this parent context.- Overrides:
getParentContextin classAbstractBsonWriter.Context- Returns:
- the context that came before this one
-