public class ConfigurationBridge extends Object implements Configuration
Settings
to Configuration
Constructor and Description |
---|
ConfigurationBridge(Settings settings) |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
get(String key)
The effective value of the specified property.
|
String[] |
getStringArray(String key)
Used to read multi-valued properties.
|
boolean |
hasKey(String key) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBoolean, getDouble, getFloat, getInt, getLong
public ConfigurationBridge(Settings settings)
public Optional<String> get(String key)
Configuration
Optional#empty()
if the property is not set and has no defined default value.
If the property is encrypted with a secret key, then the returned value is decrypted.
get
in interface Configuration
public boolean hasKey(String key)
hasKey
in interface Configuration
true
if the property has a non-default value, else false
.public String[] getStringArray(String key)
Configuration
See PropertyDefinition.Builder.multiValues(boolean)
Multi-valued properties coming from scanner are parsed as CSV lines (ie comma separator and optional double quotes to escape values).
Non quoted values are trimmed.
Examples :
getStringArray
in interface Configuration
Copyright © 2009–2018 SonarSource. All rights reserved.