Package com.consol.citrus.util
Interface TypeConverter
-
- All Known Implementing Classes:
DefaultTypeConverter
public interface TypeConverter- Author:
- Christoph Deppisch
-
-
Field Summary
Fields Modifier and Type Field Description static Map<String,TypeConverter>convertersstatic org.slf4j.LoggerLOGLoggerstatic StringRESOURCE_PATHType converter resource lookup path
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> TconvertIfNecessary(Object target, Class<T> type)Converts target object to required type if necessary.static Map<String,TypeConverter>lookup()Resolves all available converters from resource path lookup.static TypeConverterlookupDefault()Lookup default type converter specified by resource path lookup and/or environment settings.
-
-
-
Field Detail
-
LOG
static final org.slf4j.Logger LOG
Logger
-
RESOURCE_PATH
static final String RESOURCE_PATH
Type converter resource lookup path- See Also:
- Constant Field Values
-
converters
static final Map<String,TypeConverter> converters
-
-
Method Detail
-
lookup
static Map<String,TypeConverter> lookup()
Resolves all available converters from resource path lookup. Scans classpath for converter meta information and instantiates those converters.- Returns:
-
lookupDefault
static TypeConverter lookupDefault()
Lookup default type converter specified by resource path lookup and/or environment settings. In case only a single type converter is loaded via resource path lookup this converter is used regardless of any environment settings. If there are multiple converter implementations on the classpath the environment settings must specify the default. If no converter implementation is given via resource path lookup the default implementation is returned.- Returns:
- type converter to use by default.
-
-