public class ConfigurationProperty extends Object
Constructor and Description |
---|
ConfigurationProperty(String namespace,
String propertyName,
Class type) |
Modifier and Type | Method and Description |
---|---|
ConfigurationProperty |
addAlias(String... aliases)
Adds an alias for this property.
|
Object |
getDefaultValue()
Returns the default value to use if no ConfigurationProviders override it.
|
String |
getDescription()
Returns a human-readable definition of this property
|
String |
getName()
Returns the property name.
|
String |
getNamespace()
Returns the namespace used by this property's
ConfigurationContainer |
Class |
getType()
Returns the type of value stored in this property
|
Object |
getValue()
Returns the value currently stored in this property without any casting.
|
<T> T |
getValue(Class<T> type)
Returns the value currently stored in this property cast to the given type.
|
boolean |
getWasOverridden()
Returns true if the value has been set by a ConfigurationValueProvider or by
setValue(Object) |
protected void |
init(ConfigurationValueProvider[] configurationValueProviders)
Initialize this property with values in the given ConfigurationProvers.
|
ConfigurationProperty |
setDefaultValue(Object defaultValue)
Sets the default value to use if no ConfigurationProviders override it.
|
ConfigurationProperty |
setDescription(String description) |
void |
setValue(Object value)
Overwrites the value currently stored in this property.
|
protected Object |
valueOf(Object value)
Converts an object of a different type to the type used by this property.
|
protected void init(ConfigurationValueProvider[] configurationValueProviders)
setDefaultValue(Object)
.
If multiple configurationValueProviders contain values, the first in the list wins.public String getName()
public String getNamespace()
ConfigurationContainer
public Class getType()
protected Object valueOf(Object value)
public Object getValue()
public <T> T getValue(Class<T> type)
public void setValue(Object value)
public ConfigurationProperty addAlias(String... aliases)
public String getDescription()
public ConfigurationProperty setDescription(String description)
public Object getDefaultValue()
public ConfigurationProperty setDefaultValue(Object defaultValue)
public boolean getWasOverridden()
setValue(Object)
Copyright © 2020 Liquibase.org. All rights reserved.