org.apache.commons.jxpath.util
Class BasicTypeConverter

java.lang.Object
  |
  +--org.apache.commons.jxpath.util.BasicTypeConverter
All Implemented Interfaces:
TypeConverter

public class BasicTypeConverter
extends java.lang.Object
implements TypeConverter

The default implementation of TypeConverter.

Version:
$Revision: 1.7 $ $Date: 2003/03/11 00:59:34 $
Author:
Dmitri Plotnikov

Constructor Summary
BasicTypeConverter()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicTypeConverter

public BasicTypeConverter()
Method Detail

canConvert

public boolean canConvert(java.lang.Object object,
                          java.lang.Class toType)
Returns true if it can convert the supplied object to the specified class.
Specified by:
canConvert in interface TypeConverter

convert

public 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.
Specified by:
convert in interface TypeConverter


Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.