Package liquibase.configuration
Interface ConfigurationValueConverter<DataType>
-
public interface ConfigurationValueConverter<DataType>
Used byConfigurationDefinition.getCurrentConfiguredValue()
to translate whatever object type aConfigurationValueProvider
is returning into the object type the definition uses.
-
-
Field Summary
Fields Modifier and Type Field Description static ConfigurationValueConverter<Class>
CLASS
static ConfigurationValueConverter<Level>
LOG_LEVEL
Standard value -> java.util.logging.Level converterstatic ConfigurationValueConverter<String>
STRING
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataType
convert(Object value)
Converts an arbitrary object into the correct type.
-
-
-
Field Detail
-
LOG_LEVEL
static final ConfigurationValueConverter<Level> LOG_LEVEL
Standard value -> java.util.logging.Level converter
-
STRING
static final ConfigurationValueConverter<String> STRING
-
CLASS
static final ConfigurationValueConverter<Class> CLASS
-
-
Method Detail
-
convert
DataType convert(Object value) throws IllegalArgumentException
Converts an arbitrary object into the correct type. Implementations should be able to handle any type passed them, often types by calling toString() on the incoming value and parsing the string. Normally, a null value will be returned as a null value, but that is up to the implementation.- Throws:
IllegalArgumentException
- if the value cannot be parsed or is an invalid value.
-
-