Top Description Fields Constructors Methods
com.fasterxml.jackson.core

public abstract Class TSFBuilder<F extends JsonFactory, B extends TSFBuilder<F, B>>

extends Object
Class Inheritance
Known Direct Subclasses
com.fasterxml.jackson.core.JsonFactoryBuilder
Imports
java.util.ArrayList, .List, .Objects, com.fasterxml.jackson.core.io.InputDecorator, .OutputDecorator, com.fasterxml.jackson.core.json.JsonReadFeature, .JsonWriteFeature, com.fasterxml.jackson.core.util.BufferRecycler, .RecyclerPool, .JsonRecyclerPools, .JsonGeneratorDecorator

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 TypeField and Description
protected ErrorReportConfiguration
protected int
protected List<JsonGeneratorDecorator>
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 RecyclerPool<BufferRecycler>
protected StreamReadConstraints
protected int
_streamReadFeatures

Set of JsonParser.Features enabled, as bitmask.

protected StreamWriteConstraints
protected int
_streamWriteFeatures

Set of JsonGenerator.Features enabled, as bitmask.

protected static final int
DEFAULT_FACTORY_FEATURE_FLAGS

Bitfield (set of flags) of all factory features that are enabled by default.

protected static final int
DEFAULT_GENERATOR_FEATURE_FLAGS

Bitfield (set of flags) of all generator features that are enabled by default.

protected static final int
DEFAULT_PARSER_FEATURE_FLAGS

Bitfield (set of flags) of all parser features that are enabled by default.

Constructor Summary

AccessConstructor and Description
protected
protected
protected
TSFBuilder(int factoryFeatures, int parserFeatures, int generatorFeatures)

Method Summary

Modifier and TypeMethod and Description
protected static <T> List<T>
_copy(List<T> src)

private B
protected void
protected void
protected void
protected void
protected final B
public B
public abstract F

Returns:

TokenStreamFactory build based on current configuration
build
()

Method for constructing actual TokenStreamFactory instance, given configuration.

public B
configure(JsonFactory.Feature f, boolean state)

public B
configure(StreamReadFeature f, boolean state)

public B
configure(StreamWriteFeature f, boolean state)

public B
configure(JsonReadFeature f, boolean state)

public B
configure(JsonWriteFeature f, boolean state)

public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B
public B

Returns:

this builder (for call chaining)
errorReportConfiguration
(ErrorReportConfiguration
configuration values used for handling erroneous token inputs.
errorReportConfiguration
)

Sets the configuration for error reporting.

public int
public InputDecorator
public B
public OutputDecorator
public B
public RecyclerPool<BufferRecycler>
public B

Returns:

this builder (for call chaining)
recyclerPool
(RecyclerPool<BufferRecycler>
RecyclerPool to use for buffer allocation
p
)

public B

Returns:

this builder (for call chaining)
streamReadConstraints
(StreamReadConstraints
constraints for streaming reads
streamReadConstraints
)

Sets the constraints for streaming reads.

public int
public B

Returns:

this builder (for call chaining)
streamWriteConstraints
(StreamWriteConstraints
constraints for streaming reads
streamWriteConstraints
)

Sets the constraints for streaming writes.

public int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_errorReportConfigurationback to summary
protected ErrorReportConfiguration _errorReportConfiguration

ErrorReportConfiguration to use.

Since
2.16
_factoryFeaturesback to summary
protected int _factoryFeatures

Set of com.fasterxml.jackson.core.JsonFactory.Features enabled, as bitmask.

_generatorDecoratorsback to summary
protected List<JsonGeneratorDecorator> _generatorDecorators
Since
2.16
_inputDecoratorback to summary
protected InputDecorator _inputDecorator

Optional helper object that may decorate input sources, to do additional processing on input during parsing.

_outputDecoratorback to summary
protected OutputDecorator _outputDecorator

Optional helper object that may decorate output object, to do additional processing on output during content generation.

_recyclerPoolback to summary
protected RecyclerPool<BufferRecycler> _recyclerPool
Since
2.16
_streamReadConstraintsback to summary
protected StreamReadConstraints _streamReadConstraints

StreamReadConstraints to use.

Since
2.15
_streamReadFeaturesback to summary
protected int _streamReadFeatures

Set of JsonParser.Features enabled, as bitmask.

_streamWriteConstraintsback to summary
protected StreamWriteConstraints _streamWriteConstraints

StreamWriteConstraints to use.

Since
2.16
_streamWriteFeaturesback to summary
protected int _streamWriteFeatures

Set of JsonGenerator.Features enabled, as bitmask.

DEFAULT_FACTORY_FEATURE_FLAGSback to summary
protected static final int DEFAULT_FACTORY_FEATURE_FLAGS

Bitfield (set of flags) of all factory features that are enabled by default.

DEFAULT_GENERATOR_FEATURE_FLAGSback to summary
protected static final int DEFAULT_GENERATOR_FEATURE_FLAGS

Bitfield (set of flags) of all generator features that are enabled by default.

DEFAULT_PARSER_FEATURE_FLAGSback to summary
protected static final int DEFAULT_PARSER_FEATURE_FLAGS

Bitfield (set of flags) of all parser features that are enabled by default.

Constructor Detail

TSFBuilderback to summary
protected TSFBuilder()
TSFBuilderback to summary
protected TSFBuilder(JsonFactory base)
TSFBuilderback to summary
protected TSFBuilder(int factoryFeatures, int parserFeatures, int generatorFeatures)

Method Detail

_copyback to summary
protected static <T> List<T> _copy(List<T> src)
_failNonJSONback to summary
private B _failNonJSON(Object feature)
_legacyDisableback to summary
protected void _legacyDisable(JsonParser.Feature f)
_legacyDisableback to summary
protected void _legacyDisable(JsonGenerator.Feature f)
_legacyEnableback to summary
protected void _legacyEnable(JsonParser.Feature f)
_legacyEnableback to summary
protected void _legacyEnable(JsonGenerator.Feature f)
_thisback to summary
protected final B _this()
Annotations
@SuppressWarnings:unchecked
addDecoratorback to summary
public B addDecorator(JsonGeneratorDecorator decorator)
buildback to summary
public abstract F build()

Method for constructing actual TokenStreamFactory instance, given configuration.

Returns:F

TokenStreamFactory build based on current configuration

configureback to summary
public B configure(JsonFactory.Feature f, boolean state)
configureback to summary
public B configure(StreamReadFeature f, boolean state)
configureback to summary
public B configure(StreamWriteFeature f, boolean state)
configureback to summary
public B configure(JsonReadFeature f, boolean state)
configureback to summary
public B configure(JsonWriteFeature f, boolean state)
disableback to summary
public B disable(JsonFactory.Feature f)
disableback to summary
public B disable(StreamReadFeature f)
disableback to summary
public B disable(StreamReadFeature first, StreamReadFeature... other)
disableback to summary
public B disable(StreamWriteFeature f)
disableback to summary
public B disable(StreamWriteFeature first, StreamWriteFeature... other)
disableback to summary
public B disable(JsonReadFeature f)
disableback to summary
public B disable(JsonReadFeature first, JsonReadFeature... other)
disableback to summary
public B disable(JsonWriteFeature f)
disableback to summary
public B disable(JsonWriteFeature first, JsonWriteFeature... other)
enableback to summary
public B enable(JsonFactory.Feature f)
enableback to summary
public B enable(StreamReadFeature f)
enableback to summary
public B enable(StreamReadFeature first, StreamReadFeature... other)
enableback to summary
public B enable(StreamWriteFeature f)
enableback to summary
public B enable(StreamWriteFeature first, StreamWriteFeature... other)
enableback to summary
public B enable(JsonReadFeature f)
enableback to summary
public B enable(JsonReadFeature first, JsonReadFeature... other)
enableback to summary
public B enable(JsonWriteFeature f)
enableback to summary
public B enable(JsonWriteFeature first, JsonWriteFeature... other)
errorReportConfigurationback to summary
public B errorReportConfiguration(ErrorReportConfiguration errorReportConfiguration)

Sets the configuration for error reporting.

Parameters
errorReportConfiguration:ErrorReportConfiguration

configuration values used for handling erroneous token inputs.

Returns:B

this builder (for call chaining)

Since
2.16
factoryFeaturesMaskback to summary
public int factoryFeaturesMask()
inputDecoratorback to summary
public InputDecorator inputDecorator()
inputDecoratorback to summary
public B inputDecorator(InputDecorator dec)
outputDecoratorback to summary
public OutputDecorator outputDecorator()
outputDecoratorback to summary
public B outputDecorator(OutputDecorator dec)
recyclerPoolback to summary
public RecyclerPool<BufferRecycler> recyclerPool()
recyclerPoolback to summary
public B recyclerPool(RecyclerPool<BufferRecycler> p)
Parameters
p:RecyclerPool<BufferRecycler>

RecyclerPool to use for buffer allocation

Returns:B

this builder (for call chaining)

Since
2.16
streamReadConstraintsback to summary
public B streamReadConstraints(StreamReadConstraints streamReadConstraints)

Sets the constraints for streaming reads.

Parameters
streamReadConstraints:StreamReadConstraints

constraints for streaming reads

Returns:B

this builder (for call chaining)

Since
2.15
streamReadFeaturesback to summary
public int streamReadFeatures()
streamWriteConstraintsback to summary
public B streamWriteConstraints(StreamWriteConstraints streamWriteConstraints)

Sets the constraints for streaming writes.

Parameters
streamWriteConstraints:StreamWriteConstraints

constraints for streaming reads

Returns:B

this builder (for call chaining)

Since
2.16
streamWriteFeaturesback to summary
public int streamWriteFeatures()