Class JXPath11CompatibleTypeConverter

  • All Implemented Interfaces:
    TypeConverter

    public class JXPath11CompatibleTypeConverter
    extends BasicTypeConverter
    TypeConverter implementation to circumvent automagic NodeSet decoding. Suggested by JIRA issue JXPATH-10.
    Since:
    JXPath 1.3
    Version:
    $Revision: 658784 $ $Date: 2008-05-21 12:44:55 -0500 (Wed, 21 May 2008) $
    Author:
    Matt Benson
    • Constructor Detail

      • JXPath11CompatibleTypeConverter

        public JXPath11CompatibleTypeConverter()
    • Method Detail

      • canConvert

        public boolean canConvert​(java.lang.Object object,
                                  java.lang.Class toType)
        Description copied from class: BasicTypeConverter
        Returns true if it can convert the supplied object to the specified class.
        Specified by:
        canConvert in interface TypeConverter
        Overrides:
        canConvert in class BasicTypeConverter
        Parameters:
        object - to check
        toType - prospective destination class
        Returns:
        boolean
      • convert

        public java.lang.Object convert​(java.lang.Object object,
                                        java.lang.Class toType)
        Description copied from class: BasicTypeConverter
        Converts the supplied object to the specified type. Throws a runtime exception if the conversion is not possible.
        Specified by:
        convert in interface TypeConverter
        Overrides:
        convert in class BasicTypeConverter
        Parameters:
        object - to convert
        toType - destination class
        Returns:
        converted object