Class TypeConversionUtils

java.lang.Object
org.citrusframework.util.TypeConversionUtils

public abstract class TypeConversionUtils extends Object
Since:
2.5
Author:
Christoph Deppisch
  • Method Details

    • loadDefaultConverter

      public static void loadDefaultConverter()
      Reload default type converter.
    • convertIfNecessary

      public static <T> T convertIfNecessary(Object target, Class<T> type)
      Converts target object to required type if necessary.
      Type Parameters:
      T -
      Parameters:
      target -
      type -
      Returns:
    • convertStringToType

      public static <T> T convertStringToType(String value, Class<T> type)
      Convert value string to required type.
      Parameters:
      value -
      type -
      Returns:
    • convertStringToType

      public static <T> T convertStringToType(String value, Class<T> type, TestContext context)
      Convert value string to required type or read bean of type from application context.
      Parameters:
      value -
      type -
      context -
      Returns: