org.apache.commons.jxpath.util
Class BasicTypeConverter
java.lang.Object
org.apache.commons.jxpath.util.BasicTypeConverter
- TypeConverter
public class BasicTypeConverter
extends java.lang.Object
The default implementation of TypeConverter.
$Revision: 1.14 $ $Date: 2004/06/29 21:50:02 $
allocateCollection
protected Collection allocateCollection(Class type)
allocateNumber
protected Number allocateNumber(Class type,
double value)
canConvert
public boolean canConvert(Object object,
Class toType)
Returns true if it can convert the supplied
object to the specified class.
- canConvert in interface TypeConverter
canCreateCollection
protected boolean canCreateCollection(Class type)
convert
public Object convert(Object object,
Class toType)
Converts the supplied object to the specified
type. Throws a runtime exception if the conversion is
not possible.
- convert in interface TypeConverter
convertNullToPrimitive
protected Object convertNullToPrimitive(Class toType)
convertStringToPrimitive
protected Object convertStringToPrimitive(Object object,
Class toType)
unmodifiableCollection
protected Collection unmodifiableCollection(Collection collection)