public class Settings extends Object implements BatchComponent, ServerComponent
This component replaces the deprecated org.apache.commons.configuration.Configuration
Modifier and Type | Field and Description |
---|---|
protected PropertyDefinitions |
definitions |
protected Map<String,String> |
properties |
Constructor and Description |
---|
Settings() |
Settings(PropertyDefinitions definitions) |
Settings(Settings other)
Clone settings.
|
protected Map<String,String> properties
protected PropertyDefinitions definitions
public Settings()
public Settings(PropertyDefinitions definitions)
public Encryption getEncryption()
public String getDefaultValue(String key)
public boolean hasDefaultValue(String key)
protected String getClearString(String key)
public boolean getBoolean(String key)
public int getInt(String key)
public Date getDateTime(String key)
public String[] getStringArray(String key)
public String[] getStringLines(String key)
public String[] getStringArrayBySeparator(String key, String separator)
public List<String> getKeysStartingWith(String prefix)
public Settings appendProperty(String key, String value)
public Settings setProperty(String key, @Nullable String[] values)
public Settings setProperty(String key, @Nullable String value)
public Settings setProperty(String key, @Nullable Boolean value)
public Settings setProperty(String key, @Nullable Integer value)
public Settings setProperty(String key, @Nullable Long value)
public Settings setProperty(String key, @Nullable Double value)
public Settings setProperty(String key, @Nullable Float value)
public Settings setProperty(String key, @Nullable Date date)
public Settings addProperties(Map<String,String> props)
public Settings addProperties(Properties props)
@Deprecated public Settings addSystemProperties()
@Deprecated public Settings addEnvironmentVariables()
public Settings setProperties(Map<String,String> props)
public Settings setProperty(String key, @Nullable Date date, boolean includeTime)
public Settings removeProperty(String key)
public Map<String,String> getProperties()
public PropertyDefinitions getDefinitions()
public static Settings createForComponent(Object component)
protected void doOnSetProperty(String key, @Nullable String value)
protected void doOnRemoveProperty(String key)
protected void doOnClearProperties()
protected void doOnGetProperties(String key)
Copyright © 2009–2015 SonarSource. All rights reserved.