Package org.apache.commons.jxpath.util
Class JXPath11CompatibleTypeConverter
java.lang.Object
org.apache.commons.jxpath.util.BasicTypeConverter
org.apache.commons.jxpath.util.JXPath11CompatibleTypeConverter
- All Implemented Interfaces:
TypeConverter
TypeConverter implementation to circumvent automagic
NodeSet decoding. Suggested by JIRA issue JXPATH-10.- Since:
- JXPath 1.3
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.commons.jxpath.util.BasicTypeConverter
allocateCollection, allocateNumber, canCreateCollection, convertNullToPrimitive, convertStringToPrimitive, unmodifiableCollection
-
Constructor Details
-
JXPath11CompatibleTypeConverter
public JXPath11CompatibleTypeConverter()Constructs a new instance.
-
-
Method Details
-
canConvert
Description copied from class:BasicTypeConverterTests whether this instance can convert the supplied object to the specified class.- Specified by:
canConvertin interfaceTypeConverter- Overrides:
canConvertin classBasicTypeConverter- Parameters:
object- to checktoType- prospective destination class- Returns:
- boolean whether this instance can convert the supplied object to the specified class.
-
convert
Description copied from class:BasicTypeConverterConverts the supplied object to the specified type. Throws a runtime exception if the conversion is not possible.- Specified by:
convertin interfaceTypeConverter- Overrides:
convertin classBasicTypeConverter- Parameters:
object- to converttoType- destination class- Returns:
- converted object
-