public final class UnusedPropertyTrackingConfigurationPropertySource extends Object implements ConfigurationPropertySource
Constructor and Description |
---|
UnusedPropertyTrackingConfigurationPropertySource(ConfigurationPropertySource delegate,
Set<String> availablePropertyKeys) |
Modifier and Type | Method and Description |
---|---|
Optional<?> |
get(String key) |
Set<String> |
getUnusedPropertyKeys() |
Optional<String> |
resolve(String key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
empty, fromProperties, withFallback, withMask, withOverride, withPrefix
public UnusedPropertyTrackingConfigurationPropertySource(ConfigurationPropertySource delegate, Set<String> availablePropertyKeys)
public Optional<?> get(String key)
get
in interface ConfigurationPropertySource
key
- The key of the property to get.Optional.empty()
if the property is missing.public Optional<String> resolve(String key)
resolve
in interface ConfigurationPropertySource
key
- The key of the property to get.prefixes
, masks
)
reverted.
Whether the optional is empty is not related to the key having a value in the underlying configuration source;
instead, the optional is empty only if the key cannot possibly be registered in the underlying configuration source,
e.g. if the key is missing a mandatory prefix.Copyright © 2006-2018 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.