Package org.citrusframework.util
Class TypeConversionUtils
java.lang.Object
org.citrusframework.util.TypeConversionUtils
- Since:
- 2.5
- Author:
- Christoph Deppisch
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TconvertIfNecessary(Object target, Class<T> type) Converts target object to required type if necessary.static <T> TconvertStringToType(String value, Class<T> type) Convert value string to required type.static <T> TconvertStringToType(String value, Class<T> type, TestContext context) Convert value string to required type or read bean of type from application context.static voidReload default type converter.
-
Method Details
-
loadDefaultConverter
public static void loadDefaultConverter()Reload default type converter. -
convertIfNecessary
Converts target object to required type if necessary.- Type Parameters:
T-- Parameters:
target-type-- Returns:
-
convertStringToType
Convert value string to required type.- Parameters:
value-type-- Returns:
-
convertStringToType
Convert value string to required type or read bean of type from application context.- Parameters:
value-type-context-- Returns:
-