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
FieldsModifier and TypeFieldDescriptionprotected ErrorReportConfigurationErrorReportConfigurationto use.protected intSet ofJsonFactory.Features enabled, as bitmask.protected List<JsonGeneratorDecorator>protected InputDecoratorOptional helper object that may decorate input sources, to do additional processing on input during parsing.protected OutputDecoratorOptional helper object that may decorate output object, to do additional processing on output during content generation.protected RecyclerPool<BufferRecycler>protected StreamReadConstraintsStreamReadConstraintsto use.protected intSet ofJsonParser.Features enabled, as bitmask.protected StreamWriteConstraintsStreamWriteConstraintsto use.protected intSet ofJsonGenerator.Features enabled, as bitmask.protected static final intBitfield (set of flags) of all factory features that are enabled by default.protected static final intBitfield (set of flags) of all generator features that are enabled by default.protected static final intBitfield (set of flags) of all parser features that are enabled by default. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedprotectedTSFBuilder(int factoryFeatures, int parserFeatures, int generatorFeatures) protectedTSFBuilder(JsonFactory base) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> List<T>protected voidprotected voidprotected voidprotected voidprotected final B_this()addDecorator(JsonGeneratorDecorator decorator) abstract Fbuild()Method for constructing actualTokenStreamFactoryinstance, 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.intstreamReadConstraints(StreamReadConstraints streamReadConstraints) Sets the constraints for streaming reads.intstreamWriteConstraints(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.Features enabled, as bitmask. -
_streamReadFeatures
protected int _streamReadFeaturesSet ofJsonParser.Features enabled, as bitmask. -
_streamWriteFeatures
protected int _streamWriteFeaturesSet ofJsonGenerator.Features 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
StreamReadConstraintsto use.- Since:
- 2.15
-
_streamWriteConstraints
StreamWriteConstraintsto use.- Since:
- 2.16
-
_errorReportConfiguration
ErrorReportConfigurationto 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 actualTokenStreamFactoryinstance, given configuration.- Returns:
TokenStreamFactorybuild based on current configuration
-
_this
-
_legacyEnable
-
_legacyDisable
-
_legacyEnable
-
_legacyDisable
-