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
public class JXPath11CompatibleTypeConverter extends BasicTypeConverter
TypeConverter implementation to circumvent automagicNodeSetdecoding. 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) $
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.commons.jxpath.util.BasicTypeConverter
BasicTypeConverter.ValueNodeSet, BasicTypeConverter.ValuePointer
-
-
Constructor Summary
Constructors Constructor Description JXPath11CompatibleTypeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanConvert(java.lang.Object object, java.lang.Class toType)Returns true if it can convert the supplied object to the specified class.java.lang.Objectconvert(java.lang.Object object, java.lang.Class toType)Converts the supplied object to the specified type.-
Methods inherited from class org.apache.commons.jxpath.util.BasicTypeConverter
allocateCollection, allocateNumber, canCreateCollection, convertNullToPrimitive, convertStringToPrimitive, unmodifiableCollection
-
-
-
-
Method Detail
-
canConvert
public boolean canConvert(java.lang.Object object, java.lang.Class toType)Description copied from class:BasicTypeConverterReturns true if it 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
-
convert
public java.lang.Object convert(java.lang.Object object, java.lang.Class toType)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
-
-