Interface IStringConverter


public interface IStringConverter
Convert to and from a string.
  • Field Details

  • Method Details

    • convertString

      Object convertString(String val, Class<?> type, ClassLoader cl, Object context)
      Convert a string to an object.
      Parameters:
      val - The string.
      type - The target type.
      context - The context.
      Returns:
      The object.
    • convertObject

      String convertObject(Object val, Class<?> type, ClassLoader cl, Object context)
      Convert an object to a string.
      Parameters:
      val - The object.
      type - The encoding type.
      context - The context.
      Returns:
      The object.
    • getType

      String getType()
      Get the type of string that can be processed (xml, json, plain).
      Returns:
      The object.
    • isSupportedType

      boolean isSupportedType(Class<?> clazz)
      Test if the type can be converted.
      Parameters:
      clazz - The class.
      Returns:
      True if can be converted.