public static interface ConfigMap.ConfigMapWithInheritance<TContainer> extends ConfigMap
ConfigMap.ConfigMapWithInheritance<TContainer>
Modifier and Type | Method and Description |
---|---|
java.util.Map<ConfigKey<?>,java.lang.Object> |
getAllConfigInheritedRawValuesIgnoringErrors()
as
getAllConfigInheritedRawWithErrors() but simplified API, just giving values, ignoring any errors |
java.util.Map<ConfigKey<?>,ReferenceWithError<ConfigValueAtContainer<TContainer,?>>> |
getAllConfigInheritedRawWithErrors()
returns a read-only map of all config keys local and inherited together with best-effort raw values
as per
getConfigAllInheritedRaw(ConfigKey) |
java.util.Map<ConfigKey<?>,ReferenceWithError<ConfigValueAtContainer<TContainer,?>>> |
getAllReinheritableConfigRaw()
as
#getAllConfigInheritedRaw() but removes any entries which should not be re-inheritable by descendants |
java.util.List<ConfigValueAtContainer<TContainer,?>> |
getConfigAllInheritedRaw(ConfigKey<?> key)
As
ConfigMap.getConfigLocalRaw(ConfigKey) but returning all containers through the inheritance
hierarchy where a value is set (but stopping if it encounters a key is not inheritable from a container). |
<T> ReferenceWithError<ConfigValueAtContainer<TContainer,T>> |
getConfigAndContainer(ConfigKey<T> key)
Returns the container where a given key is defined, in addition to the value and data on the key it is defined against,
wrapped in something which will report any error during evaluation (in some cases these errors may otherwise
be silently ignored)
|
ReferenceWithError<ConfigValueAtContainer<TContainer,?>> |
getConfigInheritedRaw(ConfigKey<?> key)
As
ConfigMap.getConfigLocalRaw(ConfigKey) but respecting the inheritance rules. |
asMapWithStringKeys, findKeys, findKeysDeclared, findKeysPresent, getAllConfig, getAllConfigLocalRaw, getConfig, getConfig, getConfigLocalRaw, getConfigRaw, isEmpty, size, submap
<T> ReferenceWithError<ConfigValueAtContainer<TContainer,T>> getConfigAndContainer(ConfigKey<T> key)
ReferenceWithError<ConfigValueAtContainer<TContainer,?>> getConfigInheritedRaw(ConfigKey<?> key)
ConfigMap.getConfigLocalRaw(ConfigKey)
but respecting the inheritance rules.
Because inheritance may not be applicable when working with raw values the result
is wrapped in a ReferenceWithError
, and if any aspect of inheritance
could not be applied, calls to ReferenceWithError.get()
will throw
(but ReferenceWithError.getWithoutError()
will not).
Default values will be available from ConfigValueAtContainer.getDefaultValue()
but will not be considered for ConfigValueAtContainer.get()
or ConfigValueAtContainer.asMaybe()
.
Note that most modes (eg overwrite, not-inherit) will not cause issues during inheritance so this method is ordinarily fine to use. Problems arise when a merge inheritance mode is specified and it is attempting to merge a raw value which is not mergeable.
See also getConfigAllInheritedRaw(ConfigKey)
which returns the complete set
of inherited values.
key
- key to look upjava.util.List<ConfigValueAtContainer<TContainer,?>> getConfigAllInheritedRaw(ConfigKey<?> key)
ConfigMap.getConfigLocalRaw(ConfigKey)
but returning all containers through the inheritance
hierarchy where a value is set (but stopping if it encounters a key is not inheritable from a container).
The list is in order with the highest ancestor first. Config inheritance strategies are not applied, apart from aborting ancestor traversal if inheritance of a key is blocked there.
java.util.Map<ConfigKey<?>,ReferenceWithError<ConfigValueAtContainer<TContainer,?>>> getAllConfigInheritedRawWithErrors()
getConfigAllInheritedRaw(ConfigKey)
java.util.Map<ConfigKey<?>,java.lang.Object> getAllConfigInheritedRawValuesIgnoringErrors()
getAllConfigInheritedRawWithErrors()
but simplified API, just giving values, ignoring any errorsjava.util.Map<ConfigKey<?>,ReferenceWithError<ConfigValueAtContainer<TContainer,?>>> getAllReinheritableConfigRaw()
#getAllConfigInheritedRaw()
but removes any entries which should not be re-inheritable by descendants