java.lang.Object
tools.jackson.core.ObjectWriteContext.Base
- All Implemented Interfaces:
ObjectWriteContext
- Enclosing interface:
- ObjectWriteContext
Default no-op implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from interface tools.jackson.core.ObjectWriteContext
ObjectWriteContext.Base -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> TMethod for construct Array nodes for Tree Model instances.Method for construct Object nodes for Tree Model instances.intgetFormatWriteFeatures(int defaults) Accessor for gettingPrettyPrinterinstance to use for a new generator.getRootValueSeparator(SerializableString defaultSeparator) intgetStreamWriteFeatures(int defaults) booleanAccessor similar toObjectWriteContext.getPrettyPrinter()but which only indicates whether a non-nullinstance would be constructed if requested, or not.voidwriteTree(JsonGenerator g, TreeNode value) voidwriteValue(JsonGenerator g, Object value) Method that may be called to serialize given value, using specified token stream generator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface tools.jackson.core.ObjectWriteContext
createGenerator, createGenerator, createGenerator
-
Field Details
-
EMPTY_CONTEXT
-
-
Constructor Details
-
Base
public Base()
-
-
Method Details
-
getSchema
- Specified by:
getSchemain interfaceObjectWriteContext
-
getCharacterEscapes
- Specified by:
getCharacterEscapesin interfaceObjectWriteContext
-
getPrettyPrinter
Description copied from interface:ObjectWriteContextAccessor for gettingPrettyPrinterinstance to use for a new generator. Note that this MUST BE a thread-safe instance: that is, if the pretty printer implementation is stateful, a new unshared instance needs to be returned -- caller will NOT try to make a copy ofInstantiatableprinters, context must do that.- Specified by:
getPrettyPrinterin interfaceObjectWriteContext- Returns:
PrettyPrinterinstance to use for a single serialization operation
-
hasPrettyPrinter
public boolean hasPrettyPrinter()Description copied from interface:ObjectWriteContextAccessor similar toObjectWriteContext.getPrettyPrinter()but which only indicates whether a non-nullinstance would be constructed if requested, or not. This is useful for backends that have custom pretty-printing instead of relying on Jackson standard mechanism.- Specified by:
hasPrettyPrinterin interfaceObjectWriteContext- Returns:
- True if
ObjectWriteContext.getPrettyPrinter()would return non-null; false otherwise.
-
getRootValueSeparator
- Specified by:
getRootValueSeparatorin interfaceObjectWriteContext
-
getStreamWriteFeatures
public int getStreamWriteFeatures(int defaults) - Specified by:
getStreamWriteFeaturesin interfaceObjectWriteContext
-
tokenStreamFactory
- Specified by:
tokenStreamFactoryin interfaceObjectWriteContext
-
getFormatWriteFeatures
public int getFormatWriteFeatures(int defaults) - Specified by:
getFormatWriteFeaturesin interfaceObjectWriteContext
-
createObjectNode
Description copied from interface:ObjectWriteContextMethod for construct Object nodes for Tree Model instances.- Specified by:
createObjectNodein interfaceObjectWriteContext- Returns:
- Object node created
-
createArrayNode
Description copied from interface:ObjectWriteContextMethod for construct Array nodes for Tree Model instances.- Specified by:
createArrayNodein interfaceObjectWriteContext- Returns:
- Array node created
-
writeValue
Description copied from interface:ObjectWriteContextMethod that may be called to serialize given value, using specified token stream generator.- Specified by:
writeValuein interfaceObjectWriteContext- Parameters:
g- Generator to use for serializationvalue- Java value to be serialized
-
writeTree
- Specified by:
writeTreein interfaceObjectWriteContext
-
_reportUnsupportedOperation
protected <T> T _reportUnsupportedOperation()
-