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>
TSFBuilderimplementation for constructingYAMLFactoryinstances.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.yaml.snakeyaml.DumperOptions_dumperOptionsConfiguration for underlying generator to follow, if specified; left asnullfor backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Features).protected int_formatGeneratorFeaturesSet ofYAMLGenerator.Features enabled, as bitmask.protected int_formatParserFeaturesSet ofYAMLParser.Features enabled, as bitmask.protected org.yaml.snakeyaml.LoaderOptions_loaderOptionsConfiguration for underlying parser to follow, if specified; left asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems best).protected StringQuotingChecker_quotingCheckerHelper object used to determine whether property names, String values must be quoted or not.protected org.yaml.snakeyaml.DumperOptions.Version_versionYAML version for underlying generator to follow, if specified; left asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems 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 protectedYAMLFactoryBuilder()YAMLFactoryBuilder(YAMLFactory base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YAMLFactorybuild()YAMLFactoryBuilderconfigure(YAMLGenerator.Feature f, boolean state)YAMLFactoryBuilderconfigure(YAMLParser.Feature f, boolean state)YAMLFactoryBuilderdisable(YAMLGenerator.Feature f)YAMLFactoryBuilderdisable(YAMLGenerator.Feature first, YAMLGenerator.Feature... other)YAMLFactoryBuilderdisable(YAMLParser.Feature f)YAMLFactoryBuilderdisable(YAMLParser.Feature first, YAMLParser.Feature... other)org.yaml.snakeyaml.DumperOptionsdumperOptions()Configuration for underlying generator to follow, if specified; left asnullfor backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Features).YAMLFactoryBuilderdumperOptions(org.yaml.snakeyaml.DumperOptions dumperOptions)Configuration for underlying generator to follow, if specified; left asnullfor backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Features).YAMLFactoryBuilderenable(YAMLGenerator.Feature f)YAMLFactoryBuilderenable(YAMLGenerator.Feature first, YAMLGenerator.Feature... other)YAMLFactoryBuilderenable(YAMLParser.Feature f)YAMLFactoryBuilderenable(YAMLParser.Feature first, YAMLParser.Feature... other)intformatGeneratorFeaturesMask()intformatParserFeaturesMask()org.yaml.snakeyaml.LoaderOptionsloaderOptions()Configuration for underlying parser to follow, if specified; left asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems best).YAMLFactoryBuilderloaderOptions(org.yaml.snakeyaml.LoaderOptions loaderOptions)Configuration for underlying parser to follow, if specified; left asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems best).StringQuotingCheckerstringQuotingChecker()YAMLFactoryBuilderstringQuotingChecker(StringQuotingChecker sqc)Method for specifying either customStringQuotingCheckerto use instead of default one, or, that default one (seeStringQuotingChecker.Default.instance()) is to be used (when passingnullorg.yaml.snakeyaml.DumperOptions.VersionyamlVersionToWrite()YAMLFactoryBuilderyamlVersionToWrite(org.yaml.snakeyaml.DumperOptions.Version v)Method for specifying YAML version for generator to use (to produce compliant output); ifnullpassed, will letSnakeYAMLuse 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.Features enabled, as bitmask.
-
_formatParserFeatures
protected int _formatParserFeatures
Set ofYAMLParser.Features 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 asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems best).Ignored if you provide your own
DumperOptions.
-
_loaderOptions
protected org.yaml.snakeyaml.LoaderOptions _loaderOptions
Configuration for underlying parser to follow, if specified; left asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems 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 asnullfor backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Features).These
YAMLGenerator.Features are ignored if you provide your own DumperOptions:YAMLGenerator.Feature.ALLOW_LONG_KEYSYAMLGenerator.Feature.CANONICAL_OUTPUTYAMLGenerator.Feature.INDENT_ARRAYSYAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATORYAMLGenerator.Feature.SPLIT_LINESYAMLGenerator.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 customStringQuotingCheckerto 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), ornullto 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); ifnullpassed, will letSnakeYAMLuse its default settings.- Parameters:
v- YAML specification version to use for output, if not-null;nullfor 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 asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems 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- theSnakeYAMLconfiguration 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 asnullfor backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Features).These
YAMLGenerator.Features are ignored if you provide your own DumperOptions:YAMLGenerator.Feature.ALLOW_LONG_KEYSYAMLGenerator.Feature.CANONICAL_OUTPUTYAMLGenerator.Feature.INDENT_ARRAYSYAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATORYAMLGenerator.Feature.SPLIT_LINESYAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS
- Parameters:
dumperOptions- theSnakeYAMLconfiguration 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 asnullfor backwards compatibility (which means whatever default settingsSnakeYAMLdeems 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
SnakeYAMLconfiguration to use when parsing YAML - Since:
- 2.14
-
dumperOptions
public org.yaml.snakeyaml.DumperOptions dumperOptions()
Configuration for underlying generator to follow, if specified; left asnullfor backwards compatibility (which means the dumper options are derived based onYAMLGenerator.Features).These
YAMLGenerator.Features are ignored if you provide your own DumperOptions:YAMLGenerator.Feature.ALLOW_LONG_KEYSYAMLGenerator.Feature.CANONICAL_OUTPUTYAMLGenerator.Feature.INDENT_ARRAYSYAMLGenerator.Feature.INDENT_ARRAYS_WITH_INDICATORYAMLGenerator.Feature.SPLIT_LINESYAMLGenerator.Feature.USE_PLATFORM_LINE_BREAKS
- Returns:
- the
SnakeYAMLconfiguration to use when generating YAML - Since:
- 2.14
-
build
public YAMLFactory build()
- Specified by:
buildin classcom.fasterxml.jackson.core.TSFBuilder<YAMLFactory,YAMLFactoryBuilder>
-
-