Class YAMLFactoryBuilder

java.lang.Object
tools.jackson.core.TSFBuilder<F,T>
tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder<YAMLFactory,YAMLFactoryBuilder>
tools.jackson.dataformat.yaml.YAMLFactoryBuilder

public class YAMLFactoryBuilder extends tools.jackson.core.base.DecorableTSFactory.DecorableTSFBuilder<YAMLFactory,YAMLFactoryBuilder>
TSFBuilder implementation for constructing YAMLFactory instances.
  • Field Details

    • _quotingChecker

      protected StringQuotingChecker _quotingChecker
      Helper object used to determine whether property names, String values must be quoted or not.
    • _version

      protected org.snakeyaml.engine.v2.common.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.

    • _loadSettings

      protected org.snakeyaml.engine.v2.api.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.

    • _dumpSettings

      protected org.snakeyaml.engine.v2.api.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

  • Constructor Details

    • YAMLFactoryBuilder

      protected YAMLFactoryBuilder()
    • YAMLFactoryBuilder

      public YAMLFactoryBuilder(YAMLFactory base)
  • Method Details

    • enable

    • enable

      public YAMLFactoryBuilder enable(YAMLWriteFeature first, YAMLWriteFeature... other)
    • disable

    • disable

      public YAMLFactoryBuilder disable(YAMLWriteFeature first, YAMLWriteFeature... other)
    • configure

      public YAMLFactoryBuilder configure(YAMLWriteFeature f, boolean state)
    • enable

    • enable

      public YAMLFactoryBuilder enable(YAMLReadFeature first, YAMLReadFeature... other)
    • disable

      public YAMLFactoryBuilder disable(YAMLReadFeature f)
    • disable

      public YAMLFactoryBuilder disable(YAMLReadFeature first, YAMLReadFeature... other)
    • configure

      public YAMLFactoryBuilder configure(YAMLReadFeature f, boolean state)
    • stringQuotingChecker

      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 - Checker to use (if non-null), or null to use the default one (see StringQuotingChecker.Default.instance())
      Returns:
      This builder instance, to allow chaining
    • yamlVersionToWrite

      public YAMLFactoryBuilder yamlVersionToWrite(org.snakeyaml.engine.v2.common.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 - YAML specification version to use for output, if not-null; null for default handling
      Returns:
      This builder instance, to allow chaining
    • loadSettings

      public YAMLFactoryBuilder loadSettings(org.snakeyaml.engine.v2.api.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 - the SnakeYAML configuration to use when parsing YAML
      Returns:
      This builder instance, to allow chaining
    • dumperOptions

      public YAMLFactoryBuilder dumperOptions(org.snakeyaml.engine.v2.api.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 - the SnakeYAML configuration to use when generating YAML
      Returns:
      This builder instance, to allow chaining
    • yamlVersionToWrite

      public org.snakeyaml.engine.v2.common.SpecVersion yamlVersionToWrite()
    • stringQuotingChecker

      public StringQuotingChecker stringQuotingChecker()
    • loadSettings

      public org.snakeyaml.engine.v2.api.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:
      the SnakeYAML configuration to use when parsing YAML
    • dumpSettings

      public org.snakeyaml.engine.v2.api.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:
      the SnakeYAML configuration to use when generating YAML
    • build

      public YAMLFactory build()
      Specified by:
      build in class tools.jackson.core.TSFBuilder<YAMLFactory,YAMLFactoryBuilder>