| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private boolean | |
| private Integer | |
| private int | |
| private final Map | |
| private IntFunction | |
| private IntFunction | |
| private IntFunction | |
| private Optional | |
| private String | |
| private int | |
| private boolean | |
| private Schema | |
| private Map | |
| private boolean | |
| private UnaryOperator |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public LoadSettings | |
| public LoadSettingsBuilder | Returns: the builder with the provided value- if true, then the non-unique keys in a mapping are allowed (last
key wins). False by default. allowDuplicateKeys)YAML 1.2 does require unique keys. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- true to allow recursive structures as keys allowRecursiveKeys)Allow only non-recursive keys for maps and sets. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- buffer size (in bytes) for input data bufferSize)Buffer size for incoming data stream. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- the max allowed size of a single YAML document in a stream codePointLimit)The max amount of code points for every input YAML document in the stream. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- the key key, Object - the value behind the key value)Provide a custom property to be used later |
| public LoadSettingsBuilder | Returns: the builder with the provided value- specified List implementation (as a function from init size) defaultList)Provide default List implementation. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- specified Map implementation (as a function from init size) defaultMap)Provide default Map implementation. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- specified Set implementation (as a function from init size) defaultSet)Provide default Set implementation. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- non-empty configuration to substitute variables envConfig)Define EnvConfig to parse ENV format. |
| public LoadSettingsBuilder | |
| public LoadSettingsBuilder | Returns: the builder with the provided value- max number of aliases. More than 50 might be very dangerous.
Default is 50 maxAliasesForCollections)Restrict the number of aliases for collection nodes to prevent a Billion laughs attack. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- use true to parse comments to the presentation tree (Node) parseComments)Parse comments to the presentation tree (Node). |
| public LoadSettingsBuilder | Returns: the builder with the provided valueto be used for parsing schema)Provide either recommended or custom
schema instead of
default * |
| public LoadSettingsBuilder | Returns: the builder with the provided value- the map from a Tag to its constructor tagConstructors)Provide constructors for the specified tags. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- use false to save resources but use less informative error messages (no line
and context) useMarks)Marks are only used for error messages. |
| public LoadSettingsBuilder | Returns: the builder with the provided value- define the way to manage the YAML version. By default, 1.* versions
are accepted and treated as YAML 1.2. Other versions fail to parse (YamlVersionException
is thown) versionFunction)Manage YAML directive value which defines the version of the YAML specification. |
| allowDuplicateKeys | back to summary |
|---|---|
| private boolean allowDuplicateKeys | |
| allowRecursiveKeys | back to summary |
|---|---|
| private boolean allowRecursiveKeys | |
| bufferSize | back to summary |
|---|---|
| private Integer bufferSize | |
| codePointLimit | back to summary |
|---|---|
| private int codePointLimit | |
| customProperties | back to summary |
|---|---|
| private final Map<SettingKey, Object> customProperties | |
| defaultList | back to summary |
|---|---|
| private IntFunction<List<Object>> defaultList | |
| defaultMap | back to summary |
|---|---|
| private IntFunction<Map<Object, Object>> defaultMap | |
| defaultSet | back to summary |
|---|---|
| private IntFunction<Set<Object>> defaultSet | |
| envConfig | back to summary |
|---|---|
| private Optional<EnvConfig> envConfig | |
| label | back to summary |
|---|---|
| private String label | |
| maxAliasesForCollections | back to summary |
|---|---|
| private int maxAliasesForCollections | |
| parseComments | back to summary |
|---|---|
| private boolean parseComments | |
| schema | back to summary |
|---|---|
| private Schema schema | |
| tagConstructors | back to summary |
|---|---|
| private Map<Tag, ConstructNode> tagConstructors | |
| useMarks | back to summary |
|---|---|
| private boolean useMarks | |
| versionFunction | back to summary |
|---|---|
| private UnaryOperator<SpecVersion> versionFunction | |
| LoadSettingsBuilder | back to summary |
|---|---|
| pack-priv LoadSettingsBuilder() Create builder | |
| build | back to summary |
|---|---|
| public LoadSettings build() Build immutable LoadSettings
| |
| setAllowDuplicateKeys | back to summary |
|---|---|
| public LoadSettingsBuilder setAllowDuplicateKeys(boolean allowDuplicateKeys) YAML 1.2 does require unique keys. To support the backwards compatibility it is possible to select what should happen when non-unique keys are detected.
| |
| setAllowRecursiveKeys | back to summary |
|---|---|
| public LoadSettingsBuilder setAllowRecursiveKeys(boolean allowRecursiveKeys) Allow only non-recursive keys for maps and sets. By default, is it not allowed. Even though YAML allows to use anything as a key, it may cause unexpected issues when loading recursive structures.
| |
| setBufferSize | back to summary |
|---|---|
| public LoadSettingsBuilder setBufferSize(Integer bufferSize) Buffer size for incoming data stream. If the incoming stream is already buffered, then changing the buffer does not improve the performance
| |
| setCodePointLimit | back to summary |
|---|---|
| public LoadSettingsBuilder setCodePointLimit(int codePointLimit) The max amount of code points for every input YAML document in the stream. Please be aware that byte limit depends on the encoding.
| |
| setCustomProperty | back to summary |
|---|---|
| public LoadSettingsBuilder setCustomProperty(SettingKey key, Object value) Provide a custom property to be used later
| |
| setDefaultList | back to summary |
|---|---|
| public LoadSettingsBuilder setDefaultList(IntFunction<List<Object>> defaultList) Provide default List implementation.
| |
| setDefaultMap | back to summary |
|---|---|
| public LoadSettingsBuilder setDefaultMap(IntFunction<Map<Object, Object>> defaultMap) Provide default Map implementation.
| |
| setDefaultSet | back to summary |
|---|---|
| public LoadSettingsBuilder setDefaultSet(IntFunction<Set<Object>> defaultSet) Provide default Set implementation.
| |
| setEnvConfig | back to summary |
|---|---|
| public LoadSettingsBuilder setEnvConfig(Optional<EnvConfig> envConfig) Define EnvConfig to parse ENV format. If not set explicitly the variable substitution is not applied.
| |
| setLabel | back to summary |
|---|---|
| public LoadSettingsBuilder setLabel(String label) Label for the input data. Can be used to improve the error message.
| |
| setMaxAliasesForCollections | back to summary |
|---|---|
| public LoadSettingsBuilder setMaxAliasesForCollections(int maxAliasesForCollections) Restrict the number of aliases for collection nodes to prevent a Billion laughs attack. The purpose of this setting is to force SnakeYAML to fail before a lot of CPU and memory resources are allocated for the parser. Aliases for scalar nodes do not count because they do not grow exponentially.
| |
| setParseComments | back to summary |
|---|---|
| public LoadSettingsBuilder setParseComments(boolean parseComments) Parse comments to the presentation tree (Node). False by default
| |
| setSchema | back to summary |
|---|---|
| public LoadSettingsBuilder setSchema(Schema schema) Provide either recommended or custom
schema instead of
default *
| |
| setTagConstructors | back to summary |
|---|---|
| public LoadSettingsBuilder setTagConstructors(Map<Tag, ConstructNode> tagConstructors) Provide constructors for the specified tags.
| |
| setUseMarks | back to summary |
|---|---|
| public LoadSettingsBuilder setUseMarks(boolean useMarks) Marks are only used for error messages. But they require a lot of memory. True by default.
| |
| setVersionFunction | back to summary |
|---|---|
| public LoadSettingsBuilder setVersionFunction(UnaryOperator<SpecVersion> versionFunction) Manage YAML directive value which defines the version of the YAML specification. This parser supports YAML 1.2 but it can parse most of YAML 1.1 and YAML 1.0 This function allows to control the version management. For instance if the document contains old version the parser can be adapted to compensate the problem. Or it can fail to indicate that the incoming version is not supported.
| |