Interface TypeConverter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canConvert​(java.lang.Object object, java.lang.Class toType)
      Returns true if it can convert the supplied object to the specified class.
      java.lang.Object convert​(java.lang.Object object, java.lang.Class toType)
      Converts the supplied object to the specified type.
    • Method Detail

      • canConvert

        boolean canConvert​(java.lang.Object object,
                           java.lang.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

        java.lang.Object convert​(java.lang.Object object,
                                 java.lang.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