Top Description Fields Constructors Methods
tools.jackson.dataformat.yaml

public Class YAMLFactoryBuilder

extends DecorableTSFactory.DecorableTSFBuilder<YAMLFactory, YAMLFactoryBuilder>
Class Inheritance
Imports
tools.jackson.core.ErrorReportConfiguration, .StreamReadConstraints, .StreamReadFeature, .StreamWriteConstraints, tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder, tools.jackson.dataformat.yaml.util.StringQuotingChecker, org.snakeyaml.engine.v2.api.DumpSettings, .LoadSettings, org.snakeyaml.engine.v2.common.SpecVersion

tools.jackson.core.TSFBuilder implementation for constructing YAMLFactory instances.

Field Summary

Modifier and TypeField and Description
protected DumpSettings
_dumpSettings

Configuration for underlying generator to follow, if specified; left as null for backwards compatibility (which means the dumper options are derived based on YAMLWriteFeatures).

protected LoadSettings
_loadSettings

Configuration for underlying parser to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

protected StringQuotingChecker
_quotingChecker

Helper object used to determine whether property names, String values must be quoted or not.

protected SpecVersion
_version

YAML version for underlying generator to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

Inherited from tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder:
_generatorDecorators_inputDecorator_outputDecorator

Constructor Summary

AccessConstructor and Description
protected
public

Method Summary

Modifier and TypeMethod and Description
public YAMLFactory
build()

Implements abstract tools.jackson.core.TSFBuilder.build.

Method for constructing actual TokenStreamFactory instance, given configuration.

public YAMLFactoryBuilder
configure(YAMLWriteFeature f, boolean state)

public YAMLFactoryBuilder
configure(YAMLReadFeature f, boolean state)

public YAMLFactoryBuilder
public YAMLFactoryBuilder
public YAMLFactoryBuilder
public YAMLFactoryBuilder
public YAMLFactoryBuilder

Returns:

This builder instance, to allow chaining
dumperOptions
(DumpSettings
the SnakeYAML configuration to use when generating YAML
dumperOptions
)

Configuration for underlying generator to follow, if specified; left as null for backwards compatibility (which means the dumper options are derived based on YAMLWriteFeatures).

public DumpSettings

Returns:

the SnakeYAML configuration to use when generating YAML
dumpSettings
()

Configuration for underlying generator to follow, if specified; left as null for backwards compatibility (which means the dumper options are derived based on YAMLWriteFeatures).

public YAMLFactoryBuilder
public YAMLFactoryBuilder
public YAMLFactoryBuilder
public YAMLFactoryBuilder
public YAMLFactoryBuilder

Returns:

This builder instance, to allow chaining
loadSettings
(LoadSettings
the SnakeYAML configuration to use when parsing YAML
settings
)

Configuration for underlying parser to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

public LoadSettings

Returns:

the SnakeYAML configuration to use when parsing YAML
loadSettings
()

Configuration for underlying parser to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

public YAMLFactoryBuilder

Returns:

This builder instance, to allow chaining
stringQuotingChecker
(StringQuotingChecker
Checker to use (if non-null), or null to use the default one (see StringQuotingChecker.Default.instance())
sqc
)

Method for specifying either custom StringQuotingChecker to use instead of default one, or, that default one (see StringQuotingChecker.Default.instance()) is to be used (when passing null

public StringQuotingChecker
public YAMLFactoryBuilder

Returns:

This builder instance, to allow chaining
yamlVersionToWrite
(SpecVersion
YAML specification version to use for output, if not-null; null for default handling
v
)

Method for specifying YAML version for generator to use (to produce compliant output); if null passed, will let SnakeYAML use its default settings.

public SpecVersion
Inherited from tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder:
addDecoratorgeneratorDecoratorsinputDecoratorinputDecoratoroutputDecoratoroutputDecorator

Field Detail

_dumpSettingsback to summary
protected DumpSettings _dumpSettings

Configuration for underlying generator to follow, if specified; left as null for backwards compatibility (which means the dumper options are derived based on YAMLWriteFeatures).

These YAMLWriteFeatures are ignored if you provide your own DumperOptions:

  • YAMLGenerator.Feature.ALLOW_LONG_KEYS
  • YAMLGenerator.Feature.CANONICAL_OUTPUT
  • YAMLGenerator.Feature.INDENT_ARRAYS
  • YAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATOR
  • YAMLGenerator.Feature.SPLIT_LINES
  • YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS

_loadSettingsback to summary
protected LoadSettings _loadSettings

Configuration for underlying parser to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

If you need to support parsing YAML files that are larger than 3Mb, it is recommended that you provide a LoaderOptions instance where you set the Codepoint Limit to a larger value than its 3Mb default.

_quotingCheckerback to summary
protected StringQuotingChecker _quotingChecker

Helper object used to determine whether property names, String values must be quoted or not.

_versionback to summary
protected SpecVersion _version

YAML version for underlying generator to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

Ignored if you provide your own DumperOptions.

Constructor Detail

YAMLFactoryBuilderback to summary
protected YAMLFactoryBuilder()
YAMLFactoryBuilderback to summary
public YAMLFactoryBuilder(YAMLFactory base)

Method Detail

buildback to summary
public YAMLFactory build()

Implements abstract tools.jackson.core.TSFBuilder.build.

Doc from tools.jackson.core.TSFBuilder.build.

Method for constructing actual TokenStreamFactory instance, given configuration.

Annotations
@Override
configureback to summary
public YAMLFactoryBuilder configure(YAMLWriteFeature f, boolean state)
configureback to summary
public YAMLFactoryBuilder configure(YAMLReadFeature f, boolean state)
disableback to summary
public YAMLFactoryBuilder disable(YAMLWriteFeature f)
disableback to summary
public YAMLFactoryBuilder disable(YAMLWriteFeature first, YAMLWriteFeature... other)
disableback to summary
public YAMLFactoryBuilder disable(YAMLReadFeature f)
disableback to summary
public YAMLFactoryBuilder disable(YAMLReadFeature first, YAMLReadFeature... other)
dumperOptionsback to summary
public YAMLFactoryBuilder dumperOptions(DumpSettings dumperOptions)

Configuration for underlying generator to follow, if specified; left as null for backwards compatibility (which means the dumper options are derived based on YAMLWriteFeatures).

These YAMLWriteFeatures are ignored if you provide your own DumperOptions:

  • YAMLGenerator.Feature.ALLOW_LONG_KEYS
  • YAMLGenerator.Feature.CANONICAL_OUTPUT
  • YAMLGenerator.Feature.INDENT_ARRAYS
  • YAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATOR
  • YAMLGenerator.Feature.SPLIT_LINES
  • YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS

Parameters
dumperOptions:DumpSettings

the SnakeYAML configuration to use when generating YAML

Returns:YAMLFactoryBuilder

This builder instance, to allow chaining

dumpSettingsback to summary
public DumpSettings dumpSettings()

Configuration for underlying generator to follow, if specified; left as null for backwards compatibility (which means the dumper options are derived based on YAMLWriteFeatures).

These YAMLWriteFeatures are ignored if you provide your own DumperOptions:

  • YAMLGenerator.Feature.ALLOW_LONG_KEYS
  • YAMLGenerator.Feature.CANONICAL_OUTPUT
  • YAMLGenerator.Feature.INDENT_ARRAYS
  • YAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATOR
  • YAMLGenerator.Feature.SPLIT_LINES
  • YAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS

Returns:DumpSettings

the SnakeYAML configuration to use when generating YAML

enableback to summary
public YAMLFactoryBuilder enable(YAMLWriteFeature f)
enableback to summary
public YAMLFactoryBuilder enable(YAMLWriteFeature first, YAMLWriteFeature... other)
enableback to summary
public YAMLFactoryBuilder enable(YAMLReadFeature f)
enableback to summary
public YAMLFactoryBuilder enable(YAMLReadFeature first, YAMLReadFeature... other)
loadSettingsback to summary
public YAMLFactoryBuilder loadSettings(LoadSettings settings)

Configuration for underlying parser to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

If you need to support parsing YAML files that are larger than 3Mb, it is recommended that you provide a LoaderOptions instance where you set the Codepoint Limit to a larger value than its 3Mb default.

Parameters
settings:LoadSettings

the SnakeYAML configuration to use when parsing YAML

Returns:YAMLFactoryBuilder

This builder instance, to allow chaining

loadSettingsback to summary
public LoadSettings loadSettings()

Configuration for underlying parser to follow, if specified; left as null for backwards compatibility (which means whatever default settings SnakeYAML deems best).

If you need to support parsing YAML files that are larger than 3Mb, it is recommended that you provide a LoaderOptions instance where you set the Codepoint Limit to a larger value than its 3Mb default.

Returns:LoadSettings

the SnakeYAML configuration to use when parsing YAML

stringQuotingCheckerback to summary
public YAMLFactoryBuilder stringQuotingChecker(StringQuotingChecker sqc)

Method for specifying either custom StringQuotingChecker to use instead of default one, or, that default one (see StringQuotingChecker.Default.instance()) is to be used (when passing null

Parameters
sqc:StringQuotingChecker

Checker to use (if non-null), or null to use the default one (see StringQuotingChecker.Default.instance())

Returns:YAMLFactoryBuilder

This builder instance, to allow chaining

stringQuotingCheckerback to summary
public StringQuotingChecker stringQuotingChecker()
yamlVersionToWriteback to summary
public YAMLFactoryBuilder yamlVersionToWrite(SpecVersion v)

Method for specifying YAML version for generator to use (to produce compliant output); if null passed, will let SnakeYAML use its default settings.

Parameters
v:SpecVersion

YAML specification version to use for output, if not-null; null for default handling

Returns:YAMLFactoryBuilder

This builder instance, to allow chaining

yamlVersionToWriteback to summary
public SpecVersion yamlVersionToWrite()