Package org.apache.commons.jxpath.util

# Interface TypeConverter

All Known Implementing Classes:
  `BasicTypeConverter`, `JXPath11CompatibleTypeConverter`

public interface TypeConverter
A type converter can be installed on `TypeUtils` to introduce additional type conversions for JXPath. Most of the time `BasicTypeConverter` should be used as the superclass.

See Also:
  - `TypeUtils.setTypeConverter(org.apache.commons.jxpath.util.TypeConverter)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `canConvert(Object object, Class toType)`
  Returns true if it can convert the supplied object to the specified class.
  `Object`
  `convert(Object object, Class toType)`
  Converts the supplied object to the specified type.

- ## Method Details

  - ### canConvert

    boolean canConvert(Object object, Class toType)
    Returns true if it can convert the supplied object to the specified class.
    Parameters:
      `object` - object to test
      `toType` - target class
    Returns:
      boolean

  - ### convert

    Object convert(Object object, Class toType)
    Converts the supplied object to the specified type. Throws a runtime exception if the conversion is not possible.
    Parameters:
      `object` - object to convert
      `toType` - target class
    Returns:
      resulting Object