Package com.consol.citrus.util
Class DefaultTypeConverter
- java.lang.Object
-
- com.consol.citrus.util.DefaultTypeConverter
-
- All Implemented Interfaces:
TypeConverter
public class DefaultTypeConverter extends Object implements TypeConverter
- Author:
- Christoph Deppisch
-
-
Field Summary
Fields Modifier and Type Field Description static DefaultTypeConverterINSTANCE-
Fields inherited from interface com.consol.citrus.util.TypeConverter
APACHE_CAMEL, converters, DEFAULT, GROOVY, RESOURCE_PATH, SPRING
-
-
Constructor Summary
Constructors Constructor Description DefaultTypeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TconvertAfter(Object target, Class<T> type)Subclasses may add additional conversion logic in this method.protected <T> TconvertBefore(Object target, Class<T> type)<T> TconvertIfNecessary(Object target, Class<T> type)Converts target object to required type if necessary.<T> TconvertStringToType(String value, Class<T> type)Converts String value object to given type.
-
-
-
Field Detail
-
INSTANCE
public static DefaultTypeConverter INSTANCE
-
-
Method Detail
-
convertIfNecessary
public final <T> T convertIfNecessary(Object target, Class<T> type)
Description copied from interface:TypeConverterConverts target object to required type if necessary.- Specified by:
convertIfNecessaryin interfaceTypeConverter- Returns:
-
convertStringToType
public <T> T convertStringToType(String value, Class<T> type)
Description copied from interface:TypeConverterConverts String value object to given type.- Specified by:
convertStringToTypein interfaceTypeConverter- Returns:
-
-