Package com.fasterxml.jackson.core
Class TSFBuilder<F extends JsonFactory, B extends TSFBuilder<F, B>>
java.lang.Object
com.fasterxml.jackson.core.TSFBuilder<F, B>
- Direct Known Subclasses:
JsonFactoryBuilder
Since 2.10, Builder class is offered for creating token stream factories
with difference configurations: with 3.x they will be fully immutable.
- Since:
- 2.10
-
Field Summary
Modifier and TypeFieldDescriptionprotected ErrorReportConfiguration
ErrorReportConfiguration
to use.protected int
Set ofJsonFactory.Feature
s enabled, as bitmask.protected List<JsonGeneratorDecorator>
protected InputDecorator
Optional helper object that may decorate input sources, to do additional processing on input during parsing.protected OutputDecorator
Optional helper object that may decorate output object, to do additional processing on output during content generation.protected RecyclerPool<BufferRecycler>
protected StreamReadConstraints
StreamReadConstraints
to use.protected int
Set ofJsonParser.Feature
s enabled, as bitmask.protected StreamWriteConstraints
StreamWriteConstraints
to use.protected int
Set ofJsonGenerator.Feature
s enabled, as bitmask.protected static final int
Bitfield (set of flags) of all factory features that are enabled by default.protected static final int
Bitfield (set of flags) of all generator features that are enabled by default.protected static final int
Bitfield (set of flags) of all parser features that are enabled by default. -
Constructor Summary
ModifierConstructorDescriptionprotected
protected
TSFBuilder
(int factoryFeatures, int parserFeatures, int generatorFeatures) protected
TSFBuilder
(JsonFactory base) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> List<T>
protected void
protected void
protected void
protected void
protected final B
_this()
addDecorator
(JsonGeneratorDecorator decorator) abstract F
build()
Method for constructing actualTokenStreamFactory
instance, given configuration.configure
(JsonReadFeature f, boolean state) configure
(JsonWriteFeature f, boolean state) configure
(JsonFactory.Feature f, boolean state) configure
(StreamReadFeature f, boolean state) configure
(StreamWriteFeature f, boolean state) disable
(JsonReadFeature first, JsonReadFeature... other) disable
(JsonWriteFeature first, JsonWriteFeature... other) disable
(StreamReadFeature first, StreamReadFeature... other) disable
(StreamWriteFeature first, StreamWriteFeature... other) enable
(JsonReadFeature first, JsonReadFeature... other) enable
(JsonWriteFeature first, JsonWriteFeature... other) enable
(StreamReadFeature first, StreamReadFeature... other) enable
(StreamWriteFeature first, StreamWriteFeature... other) errorReportConfiguration
(ErrorReportConfiguration errorReportConfiguration) Sets the configuration for error reporting.int
streamReadConstraints
(StreamReadConstraints streamReadConstraints) Sets the constraints for streaming reads.int
streamWriteConstraints
(StreamWriteConstraints streamWriteConstraints) Sets the constraints for streaming writes.int
-
Field Details
-
DEFAULT_FACTORY_FEATURE_FLAGS
protected static final int DEFAULT_FACTORY_FEATURE_FLAGSBitfield (set of flags) of all factory features that are enabled by default. -
DEFAULT_PARSER_FEATURE_FLAGS
protected static final int DEFAULT_PARSER_FEATURE_FLAGSBitfield (set of flags) of all parser features that are enabled by default. -
DEFAULT_GENERATOR_FEATURE_FLAGS
protected static final int DEFAULT_GENERATOR_FEATURE_FLAGSBitfield (set of flags) of all generator features that are enabled by default. -
_factoryFeatures
protected int _factoryFeaturesSet ofJsonFactory.Feature
s enabled, as bitmask. -
_streamReadFeatures
protected int _streamReadFeaturesSet ofJsonParser.Feature
s enabled, as bitmask. -
_streamWriteFeatures
protected int _streamWriteFeaturesSet ofJsonGenerator.Feature
s enabled, as bitmask. -
_recyclerPool
- Since:
- 2.16
-
_inputDecorator
Optional helper object that may decorate input sources, to do additional processing on input during parsing. -
_outputDecorator
Optional helper object that may decorate output object, to do additional processing on output during content generation. -
_streamReadConstraints
StreamReadConstraints
to use.- Since:
- 2.15
-
_streamWriteConstraints
StreamWriteConstraints
to use.- Since:
- 2.16
-
_errorReportConfiguration
ErrorReportConfiguration
to use.- Since:
- 2.16
-
_generatorDecorators
- Since:
- 2.16
-
-
Constructor Details
-
TSFBuilder
protected TSFBuilder() -
TSFBuilder
-
TSFBuilder
protected TSFBuilder(int factoryFeatures, int parserFeatures, int generatorFeatures)
-
-
Method Details
-
_copy
-
factoryFeaturesMask
public int factoryFeaturesMask() -
streamReadFeatures
public int streamReadFeatures() -
streamWriteFeatures
public int streamWriteFeatures() -
recyclerPool
-
inputDecorator
-
outputDecorator
-
enable
-
disable
-
configure
-
enable
-
enable
-
disable
-
disable
-
configure
-
enable
-
enable
-
disable
-
disable
-
configure
-
enable
-
enable
-
disable
-
disable
-
configure
-
enable
-
enable
-
disable
-
disable
-
configure
-
recyclerPool
- Parameters:
p
- RecyclerPool to use for buffer allocation- Returns:
- this builder (for call chaining)
- Since:
- 2.16
-
inputDecorator
-
outputDecorator
-
addDecorator
-
streamReadConstraints
Sets the constraints for streaming reads.- Parameters:
streamReadConstraints
- constraints for streaming reads- Returns:
- this builder (for call chaining)
- Since:
- 2.15
-
streamWriteConstraints
Sets the constraints for streaming writes.- Parameters:
streamWriteConstraints
- constraints for streaming reads- Returns:
- this builder (for call chaining)
- Since:
- 2.16
-
errorReportConfiguration
Sets the configuration for error reporting.- Parameters:
errorReportConfiguration
- configuration values used for handling erroneous token inputs.- Returns:
- this builder (for call chaining)
- Since:
- 2.16
-
build
Method for constructing actualTokenStreamFactory
instance, given configuration.- Returns:
TokenStreamFactory
build based on current configuration
-
_this
-
_legacyEnable
-
_legacyDisable
-
_legacyEnable
-
_legacyDisable
-