Package org.citrusframework.util
Class DefaultTypeConverter
java.lang.Object
org.citrusframework.util.DefaultTypeConverter
- All Implemented Interfaces:
TypeConverter
- Author:
- Christoph Deppisch
-
Field Summary
FieldsFields inherited from interface org.citrusframework.util.TypeConverter
APACHE_CAMEL, converters, DEFAULT, GROOVY, RESOURCE_PATH, SPRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <T> TconvertAfter(Object target, Class<T> type) Subclasses may add additional conversion logic in this method.protected <T> Optional<T>convertBefore(Object target, Class<T> type) final <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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.util.TypeConverter
asNormalizedArrayString
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DefaultTypeConverter
public DefaultTypeConverter()
-
-
Method Details
-
convertIfNecessary
Description copied from interface:TypeConverterConverts target object to required type if necessary.- Specified by:
convertIfNecessaryin interfaceTypeConverter- Returns:
-
convertStringToType
Description copied from interface:TypeConverterConverts String value object to given type.- Specified by:
convertStringToTypein interfaceTypeConverter- Returns:
-
convertBefore
-
convertAfter
Subclasses may add additional conversion logic in this method. This is only consulted as a fallback if none of the default conversion strategies did succeed.- Type Parameters:
T-- Parameters:
target-type-- Returns:
-