Class DefaultTypeConverter

java.lang.Object
org.citrusframework.util.DefaultTypeConverter
All Implemented Interfaces:
TypeConverter

public class DefaultTypeConverter extends Object implements TypeConverter
Author:
Christoph Deppisch
  • Field Details

  • Constructor Details

    • DefaultTypeConverter

      public DefaultTypeConverter()
  • Method Details

    • convertIfNecessary

      public final <T> T convertIfNecessary(Object target, Class<T> type)
      Description copied from interface: TypeConverter
      Converts target object to required type if necessary.
      Specified by:
      convertIfNecessary in interface TypeConverter
      Returns:
    • convertStringToType

      public <T> T convertStringToType(String value, Class<T> type)
      Description copied from interface: TypeConverter
      Converts String value object to given type.
      Specified by:
      convertStringToType in interface TypeConverter
      Returns:
    • convertBefore

      protected <T> Optional<T> convertBefore(Object target, Class<T> type)
    • convertAfter

      protected <T> T convertAfter(Object target, Class<T> type)
      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: