Class CharacterArrayConverter

java.lang.Object
jodd.typeconverter.impl.CharacterArrayConverter
All Implemented Interfaces:
TypeConverter<char[]>

public class CharacterArrayConverter extends Object implements TypeConverter<char[]>
Converts given object to char[].
  • Field Details

  • Constructor Details

    • CharacterArrayConverter

      public CharacterArrayConverter(TypeConverterManager typeConverterManager)
  • Method Details

    • convert

      public char[] convert(Object value)
      Description copied from interface: TypeConverter
      Converts object received as parameter into object of another class. For example, an Integer converter tries to convert given objects into target Integer object. Converters should try all reasonable ways of conversion into target object, depending on target type.
      Specified by:
      convert in interface TypeConverter<char[]>
      Parameters:
      value - object to convert from
      Returns:
      resulting object converted to target type
    • convertType

      protected char convertType(Object value)
      Converts type using type converter manager.
    • convertToSingleElementArray

      protected char[] convertToSingleElementArray(Object value)
      Creates an array with single element.
    • convertValueToArray

      protected char[] convertValueToArray(Object value)
      Converts non-array value to array. Detects various collection types and iterates them to make conversion and to create target array.
    • convertArrayToArray

      protected char[] convertArrayToArray(Object value)
      Converts array value to array.
    • convertPrimitiveArrayToArray

      protected char[] convertPrimitiveArrayToArray(Object value, Class primitiveComponentType)
      Converts primitive array to target array.