Class YAMLFactoryBuilder
- java.lang.Object
-
- com.fasterxml.jackson.core.TSFBuilder<YAMLFactory,YAMLFactoryBuilder>
-
- com.fasterxml.jackson.dataformat.yaml.YAMLFactoryBuilder
-
public class YAMLFactoryBuilder extends com.fasterxml.jackson.core.TSFBuilder<YAMLFactory,YAMLFactoryBuilder>
TSFBuilder
implementation for constructingYAMLFactory
instances.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.yaml.snakeyaml.DumperOptions
_dumperOptions
Configuration for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Feature
s).protected int
_formatGeneratorFeatures
Set ofYAMLGenerator.Feature
s enabled, as bitmask.protected int
_formatParserFeatures
Set ofYAMLParser.Feature
s enabled, as bitmask.protected org.yaml.snakeyaml.LoaderOptions
_loaderOptions
Configuration for underlying parser to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
deems best).protected StringQuotingChecker
_quotingChecker
Helper object used to determine whether property names, String values must be quoted or not.protected org.yaml.snakeyaml.DumperOptions.Version
_version
YAML version for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
deems best).-
Fields inherited from class com.fasterxml.jackson.core.TSFBuilder
_errorReportConfiguration, _factoryFeatures, _generatorDecorators, _inputDecorator, _outputDecorator, _recyclerPool, _streamReadConstraints, _streamReadFeatures, _streamWriteConstraints, _streamWriteFeatures, DEFAULT_FACTORY_FEATURE_FLAGS, DEFAULT_GENERATOR_FEATURE_FLAGS, DEFAULT_PARSER_FEATURE_FLAGS
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
YAMLFactoryBuilder()
YAMLFactoryBuilder(YAMLFactory base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YAMLFactory
build()
YAMLFactoryBuilder
configure(YAMLGenerator.Feature f, boolean state)
YAMLFactoryBuilder
configure(YAMLParser.Feature f, boolean state)
YAMLFactoryBuilder
disable(YAMLGenerator.Feature f)
YAMLFactoryBuilder
disable(YAMLGenerator.Feature first, YAMLGenerator.Feature... other)
YAMLFactoryBuilder
disable(YAMLParser.Feature f)
YAMLFactoryBuilder
disable(YAMLParser.Feature first, YAMLParser.Feature... other)
org.yaml.snakeyaml.DumperOptions
dumperOptions()
Configuration for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Feature
s).YAMLFactoryBuilder
dumperOptions(org.yaml.snakeyaml.DumperOptions dumperOptions)
Configuration for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Feature
s).YAMLFactoryBuilder
enable(YAMLGenerator.Feature f)
YAMLFactoryBuilder
enable(YAMLGenerator.Feature first, YAMLGenerator.Feature... other)
YAMLFactoryBuilder
enable(YAMLParser.Feature f)
YAMLFactoryBuilder
enable(YAMLParser.Feature first, YAMLParser.Feature... other)
int
formatGeneratorFeaturesMask()
int
formatParserFeaturesMask()
org.yaml.snakeyaml.LoaderOptions
loaderOptions()
Configuration for underlying parser to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
deems best).YAMLFactoryBuilder
loaderOptions(org.yaml.snakeyaml.LoaderOptions loaderOptions)
Configuration for underlying parser to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
deems best).StringQuotingChecker
stringQuotingChecker()
YAMLFactoryBuilder
stringQuotingChecker(StringQuotingChecker sqc)
Method for specifying either customStringQuotingChecker
to use instead of default one, or, that default one (seeStringQuotingChecker.Default.instance()
) is to be used (when passingnull
org.yaml.snakeyaml.DumperOptions.Version
yamlVersionToWrite()
YAMLFactoryBuilder
yamlVersionToWrite(org.yaml.snakeyaml.DumperOptions.Version v)
Method for specifying YAML version for generator to use (to produce compliant output); ifnull
passed, will letSnakeYAML
use its default settings.-
Methods inherited from class com.fasterxml.jackson.core.TSFBuilder
_copy, _legacyDisable, _legacyDisable, _legacyEnable, _legacyEnable, _this, addDecorator, configure, configure, configure, configure, configure, disable, disable, disable, disable, disable, disable, disable, disable, disable, enable, enable, enable, enable, enable, enable, enable, enable, enable, errorReportConfiguration, factoryFeaturesMask, inputDecorator, inputDecorator, outputDecorator, outputDecorator, recyclerPool, recyclerPool, streamReadConstraints, streamReadFeatures, streamWriteConstraints, streamWriteFeatures
-
-
-
-
Field Detail
-
_formatGeneratorFeatures
protected int _formatGeneratorFeatures
Set ofYAMLGenerator.Feature
s enabled, as bitmask.
-
_formatParserFeatures
protected int _formatParserFeatures
Set ofYAMLParser.Feature
s enabled, as bitmask.- Since:
- 2.15
-
_quotingChecker
protected StringQuotingChecker _quotingChecker
Helper object used to determine whether property names, String values must be quoted or not.- Since:
- 2.12
-
_version
protected org.yaml.snakeyaml.DumperOptions.Version _version
YAML version for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
deems best).Ignored if you provide your own
DumperOptions
.
-
_loaderOptions
protected org.yaml.snakeyaml.LoaderOptions _loaderOptions
Configuration for underlying parser to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
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.
- Since:
- 2.14
-
_dumperOptions
protected org.yaml.snakeyaml.DumperOptions _dumperOptions
Configuration for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Feature
s).These
YAMLGenerator.Feature
s 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
- Since:
- 2.14
-
-
Constructor Detail
-
YAMLFactoryBuilder
protected YAMLFactoryBuilder()
-
YAMLFactoryBuilder
public YAMLFactoryBuilder(YAMLFactory base)
-
-
Method Detail
-
enable
public YAMLFactoryBuilder enable(YAMLParser.Feature f)
-
enable
public YAMLFactoryBuilder enable(YAMLParser.Feature first, YAMLParser.Feature... other)
-
disable
public YAMLFactoryBuilder disable(YAMLParser.Feature f)
-
disable
public YAMLFactoryBuilder disable(YAMLParser.Feature first, YAMLParser.Feature... other)
-
configure
public YAMLFactoryBuilder configure(YAMLParser.Feature f, boolean state)
-
enable
public YAMLFactoryBuilder enable(YAMLGenerator.Feature f)
-
enable
public YAMLFactoryBuilder enable(YAMLGenerator.Feature first, YAMLGenerator.Feature... other)
-
disable
public YAMLFactoryBuilder disable(YAMLGenerator.Feature f)
-
disable
public YAMLFactoryBuilder disable(YAMLGenerator.Feature first, YAMLGenerator.Feature... other)
-
configure
public YAMLFactoryBuilder configure(YAMLGenerator.Feature f, boolean state)
-
stringQuotingChecker
public YAMLFactoryBuilder stringQuotingChecker(StringQuotingChecker sqc)
Method for specifying either customStringQuotingChecker
to use instead of default one, or, that default one (seeStringQuotingChecker.Default.instance()
) is to be used (when passingnull
- Parameters:
sqc
- Checker to use (if non-null), ornull
to use the default one (seeStringQuotingChecker.Default.instance()
)- Returns:
- This builder instance, to allow chaining
-
yamlVersionToWrite
public YAMLFactoryBuilder yamlVersionToWrite(org.yaml.snakeyaml.DumperOptions.Version v)
Method for specifying YAML version for generator to use (to produce compliant output); ifnull
passed, will letSnakeYAML
use its default settings.- Parameters:
v
- YAML specification version to use for output, if not-null;null
for default handling- Returns:
- This builder instance, to allow chaining
-
loaderOptions
public YAMLFactoryBuilder loaderOptions(org.yaml.snakeyaml.LoaderOptions loaderOptions)
Configuration for underlying parser to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
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:
loaderOptions
- theSnakeYAML
configuration to use when parsing YAML- Returns:
- This builder instance, to allow chaining
- Since:
- 2.14
-
dumperOptions
public YAMLFactoryBuilder dumperOptions(org.yaml.snakeyaml.DumperOptions dumperOptions)
Configuration for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Feature
s).These
YAMLGenerator.Feature
s 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
- theSnakeYAML
configuration to use when generating YAML- Returns:
- This builder instance, to allow chaining
- Since:
- 2.14
-
formatParserFeaturesMask
public int formatParserFeaturesMask()
-
formatGeneratorFeaturesMask
public int formatGeneratorFeaturesMask()
-
yamlVersionToWrite
public org.yaml.snakeyaml.DumperOptions.Version yamlVersionToWrite()
-
stringQuotingChecker
public StringQuotingChecker stringQuotingChecker()
-
loaderOptions
public org.yaml.snakeyaml.LoaderOptions loaderOptions()
Configuration for underlying parser to follow, if specified; left asnull
for backwards compatibility (which means whatever default settingsSnakeYAML
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:
- the
SnakeYAML
configuration to use when parsing YAML - Since:
- 2.14
-
dumperOptions
public org.yaml.snakeyaml.DumperOptions dumperOptions()
Configuration for underlying generator to follow, if specified; left asnull
for backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Feature
s).These
YAMLGenerator.Feature
s 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:
- the
SnakeYAML
configuration to use when generating YAML - Since:
- 2.14
-
build
public YAMLFactory build()
- Specified by:
build
in classcom.fasterxml.jackson.core.TSFBuilder<YAMLFactory,YAMLFactoryBuilder>
-
-