Top Description Fields Constructors Methods
tools.jackson.core

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

extends Object
Class Inheritance
Known Direct Subclasses
tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder
Imports
java.util.Objects, tools.jackson.core.util.BufferRecycler, .RecyclerPool

Since factory instances are immutable, a Builder class is needed for creating configurations for differently configured factory instances.

Field Summary

Modifier and TypeField and Description
protected ErrorReportConfiguration
protected int
_factoryFeatures

Set of TokenStreamFactory.Features enabled, as bitmask.

protected int
_formatReadFeatures

Set of format-specific read FormatFeatures enabled, as bitmask.

protected int
_formatWriteFeatures

Set of format-specific write FormatFeatures enabled, as bitmask.

protected RecyclerPool<BufferRecycler>
_recyclerPool

Buffer recycler provider to use.

protected StreamReadConstraints
_streamReadConstraints

StreamReadConstraints to use.

protected int
_streamReadFeatures

Set of StreamReadFeatures enabled, as bitmask.

protected StreamWriteConstraints
_streamWriteConstraints

StreamWriteConstraints to use.

protected int
_streamWriteFeatures

Set of StreamWriteFeatures enabled, as bitmask.

Constructor Summary

AccessConstructor and Description
protected
TSFBuilder(StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, int formatReadF, int formatWriteF)

protected
protected
TSFBuilder(RecyclerPool<BufferRecycler> brp, StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, int factoryFeatures, int streamReadFeatures, int streamWriteFeatures, int formatReadFeatures, int formatWriteFeatures)

Method Summary

Modifier and TypeMethod and Description
protected final B
public abstract F

Returns:

TokenStreamFactory build using builder configuration settings
build
()

Method for constructing actual TokenStreamFactory instance, given configuration.

public B
public B
configure(StreamReadFeature f, boolean state)

public B
configure(StreamWriteFeature f, boolean state)

public B
configureForJackson2()

The builder returned uses default settings more closely matching the default configs used in Jackson 2.x versions.

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
errorReportConfiguration
(ErrorReportConfiguration
configuration values used for handling errorneous token inputs.
errorReportConfiguration
)

Sets the configuration for error tokens.

public int
public int
public int
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
streamReadConstraints
(StreamReadConstraints
constraints for streaming reads
streamReadConstraints
)

Sets the constraints for streaming reads.

public int
public B

Returns:

this builder
streamWriteConstraints
(StreamWriteConstraints
constraints for streaming writes
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.

_factoryFeaturesback to summary
protected int _factoryFeatures

Set of TokenStreamFactory.Features enabled, as bitmask.

_formatReadFeaturesback to summary
protected int _formatReadFeatures

Set of format-specific read FormatFeatures enabled, as bitmask.

_formatWriteFeaturesback to summary
protected int _formatWriteFeatures

Set of format-specific write FormatFeatures enabled, as bitmask.

_recyclerPoolback to summary
protected RecyclerPool<BufferRecycler> _recyclerPool

Buffer recycler provider to use.

_streamReadConstraintsback to summary
protected StreamReadConstraints _streamReadConstraints

StreamReadConstraints to use.

_streamReadFeaturesback to summary
protected int _streamReadFeatures

Set of StreamReadFeatures enabled, as bitmask.

_streamWriteConstraintsback to summary
protected StreamWriteConstraints _streamWriteConstraints

StreamWriteConstraints to use.

_streamWriteFeaturesback to summary
protected int _streamWriteFeatures

Set of StreamWriteFeatures enabled, as bitmask.

Constructor Detail

TSFBuilderback to summary
protected TSFBuilder(StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, int formatReadF, int formatWriteF)
TSFBuilderback to summary
protected TSFBuilder(TokenStreamFactory base)
TSFBuilderback to summary
protected TSFBuilder(RecyclerPool<BufferRecycler> brp, StreamReadConstraints src, StreamWriteConstraints swc, ErrorReportConfiguration erc, int factoryFeatures, int streamReadFeatures, int streamWriteFeatures, int formatReadFeatures, int formatWriteFeatures)

Method Detail

_thisback to summary
protected final B _this()
Annotations
@SuppressWarnings:unchecked
buildback to summary
public abstract F build()

Method for constructing actual TokenStreamFactory instance, given configuration.

Returns:F

TokenStreamFactory build using builder configuration settings

configureback to summary
public B configure(TokenStreamFactory.Feature f, boolean state)
configureback to summary
public B configure(StreamReadFeature f, boolean state)
configureback to summary
public B configure(StreamWriteFeature f, boolean state)
configureForJackson2back to summary
public B configureForJackson2()

The builder returned uses default settings more closely matching the default configs used in Jackson 2.x versions.

This method is still a work in progress and may not yet fully replicate the default settings of Jackson 2.x.

disableback to summary
public B disable(TokenStreamFactory.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)
enableback to summary
public B enable(TokenStreamFactory.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)
errorReportConfigurationback to summary
public B errorReportConfiguration(ErrorReportConfiguration errorReportConfiguration)

Sets the configuration for error tokens.

Parameters
errorReportConfiguration:ErrorReportConfiguration

configuration values used for handling errorneous token inputs.

Returns:B

this builder

factoryFeaturesMaskback to summary
public int factoryFeaturesMask()
formatReadFeaturesMaskback to summary
public int formatReadFeaturesMask()
formatWriteFeaturesMaskback to summary
public int formatWriteFeaturesMask()
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)

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

streamReadFeaturesMaskback to summary
public int streamReadFeaturesMask()
streamWriteConstraintsback to summary
public B streamWriteConstraints(StreamWriteConstraints streamWriteConstraints)

Sets the constraints for streaming writes.

Parameters
streamWriteConstraints:StreamWriteConstraints

constraints for streaming writes

Returns:B

this builder

streamWriteFeaturesMaskback to summary
public int streamWriteFeaturesMask()