public static final class ConfigFilters.ValueResolvingBuilder extends Object implements Supplier<Function<Config,ConfigFilter>>
The ValueResolvingFilter can either allow (the default) or reject
references to missing tokens. To reject such references, invoke the
failOnMissingReference method on the builder before invoking
build().
Alternatively, if you create the builder using the
create(io.helidon.config.Config) method, in the Config
instance you pass set the config key
"config.value-resolving-filter.fail-on-missing-reference" to true.
| Modifier and Type | Field and Description |
|---|---|
static String |
FAIL_ON_MISSING_REFERENCE_KEY_NAME
Config key for setting missing reference behavior on
ValueResolvingFilters. |
| Modifier and Type | Method and Description |
|---|---|
Function<Config,ConfigFilter> |
build()
Creates a function of values reference resolving.
|
static ConfigFilters.ValueResolvingBuilder |
create(Config metaConfig)
Initializes config filter instance from configuration properties.
|
ConfigFilters.ValueResolvingBuilder |
failOnMissingReference(boolean failOnMissing)
Sets how the
ValueResolvingFilter resulting from this builder
will behave when a value contains a reference to a non-existent
key. |
Function<Config,ConfigFilter> |
get() |
public static final String FAIL_ON_MISSING_REFERENCE_KEY_NAME
ValueResolvingFilters.public static ConfigFilters.ValueResolvingBuilder create(Config metaConfig) throws ConfigMappingException, MissingValueException
Optional properties:
failOnMissingReference - type Boolean, see failOnMissingReferencemetaConfig - meta-configuration used to initialize returned config filter instance frommetaConfigMissingValueException - in case the configuration tree does not contain all expected sub-nodes
required by the mapper implementation to provide instance of Java type.ConfigMappingException - in case the mapper fails to map the (existing) configuration tree represented by the
supplied configuration node to an instance of a given Java type.ConfigFilters.valueResolving()public ConfigFilters.ValueResolvingBuilder failOnMissingReference(boolean failOnMissing)
ValueResolvingFilter resulting from this builder
will behave when a value contains a reference to a non-existent
key.failOnMissing - whether the filter should fail on missing references
or notpublic Function<Config,ConfigFilter> build()
public Function<Config,ConfigFilter> get()
get in interface Supplier<Function<Config,ConfigFilter>>Copyright © 2018–2019 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms.