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
public abstract class TSFBuilder<F extends JsonFactory,B extends TSFBuilder<F,B>> extends Object
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
Fields Modifier and Type Field Description protected int
_factoryFeatures
Set ofTokenStreamFactory.Feature
s enabled, as bitmask.protected InputDecorator
_inputDecorator
Optional helper object that may decorate input sources, to do additional processing on input during parsing.protected OutputDecorator
_outputDecorator
Optional helper object that may decorate output object, to do additional processing on output during content generation.protected int
_streamReadFeatures
Set ofJsonParser.Feature
s enabled, as bitmask.protected int
_streamWriteFeatures
Set ofJsonGenerator.Feature
s enabled, as bitmask.protected static int
DEFAULT_FACTORY_FEATURE_FLAGS
Bitfield (set of flags) of all factory features that are enabled by default.protected static int
DEFAULT_GENERATOR_FEATURE_FLAGS
Bitfield (set of flags) of all generator features that are enabled by default.protected static int
DEFAULT_PARSER_FEATURE_FLAGS
Bitfield (set of flags) of all parser features that are enabled by default.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TSFBuilder()
protected
TSFBuilder(int factoryFeatures, int parserFeatures, int generatorFeatures)
protected
TSFBuilder(JsonFactory base)
-
Method Summary
-
-
-
Field Detail
-
DEFAULT_FACTORY_FEATURE_FLAGS
protected static final int DEFAULT_FACTORY_FEATURE_FLAGS
Bitfield (set of flags) of all factory features that are enabled by default.
-
DEFAULT_PARSER_FEATURE_FLAGS
protected static final int DEFAULT_PARSER_FEATURE_FLAGS
Bitfield (set of flags) of all parser features that are enabled by default.
-
DEFAULT_GENERATOR_FEATURE_FLAGS
protected static final int DEFAULT_GENERATOR_FEATURE_FLAGS
Bitfield (set of flags) of all generator features that are enabled by default.
-
_factoryFeatures
protected int _factoryFeatures
Set ofTokenStreamFactory.Feature
s enabled, as bitmask.
-
_streamReadFeatures
protected int _streamReadFeatures
Set ofJsonParser.Feature
s enabled, as bitmask.
-
_streamWriteFeatures
protected int _streamWriteFeatures
Set ofJsonGenerator.Feature
s enabled, as bitmask.
-
_inputDecorator
protected InputDecorator _inputDecorator
Optional helper object that may decorate input sources, to do additional processing on input during parsing.
-
_outputDecorator
protected OutputDecorator _outputDecorator
Optional helper object that may decorate output object, to do additional processing on output during content generation.
-
-
Constructor Detail
-
TSFBuilder
protected TSFBuilder()
-
TSFBuilder
protected TSFBuilder(JsonFactory base)
-
TSFBuilder
protected TSFBuilder(int factoryFeatures, int parserFeatures, int generatorFeatures)
-
-
Method Detail
-
factoryFeaturesMask
public int factoryFeaturesMask()
-
streamReadFeatures
public int streamReadFeatures()
-
streamWriteFeatures
public int streamWriteFeatures()
-
inputDecorator
public InputDecorator inputDecorator()
-
outputDecorator
public OutputDecorator outputDecorator()
-
enable
public B enable(JsonFactory.Feature f)
-
disable
public B disable(JsonFactory.Feature f)
-
configure
public B configure(JsonFactory.Feature f, boolean state)
-
enable
public B enable(StreamReadFeature f)
-
enable
public B enable(StreamReadFeature first, StreamReadFeature... other)
-
disable
public B disable(StreamReadFeature f)
-
disable
public B disable(StreamReadFeature first, StreamReadFeature... other)
-
configure
public B configure(StreamReadFeature f, boolean state)
-
enable
public B enable(StreamWriteFeature f)
-
enable
public B enable(StreamWriteFeature first, StreamWriteFeature... other)
-
disable
public B disable(StreamWriteFeature f)
-
disable
public B disable(StreamWriteFeature first, StreamWriteFeature... other)
-
configure
public B configure(StreamWriteFeature f, boolean state)
-
enable
public B enable(JsonReadFeature f)
-
enable
public B enable(JsonReadFeature first, JsonReadFeature... other)
-
disable
public B disable(JsonReadFeature f)
-
disable
public B disable(JsonReadFeature first, JsonReadFeature... other)
-
configure
public B configure(JsonReadFeature f, boolean state)
-
enable
public B enable(JsonWriteFeature f)
-
enable
public B enable(JsonWriteFeature first, JsonWriteFeature... other)
-
disable
public B disable(JsonWriteFeature f)
-
disable
public B disable(JsonWriteFeature first, JsonWriteFeature... other)
-
configure
public B configure(JsonWriteFeature f, boolean state)
-
inputDecorator
public B inputDecorator(InputDecorator dec)
-
outputDecorator
public B outputDecorator(OutputDecorator dec)
-
build
public abstract F build()
Method for constructing actualTokenStreamFactory
instance, given configuration.
-
_this
protected final B _this()
-
_legacyEnable
protected void _legacyEnable(JsonParser.Feature f)
-
_legacyDisable
protected void _legacyDisable(JsonParser.Feature f)
-
_legacyEnable
protected void _legacyEnable(JsonGenerator.Feature f)
-
_legacyDisable
protected void _legacyDisable(JsonGenerator.Feature f)
-
-