Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.jxpath.util
Interface TypeConverter

All Known Implementing Classes:
  BasicTypeConverter

public interface TypeConverter

A type converter can be installed on TypeUtils to introduce additional type conversions for JXPath. Most of the time BasicTypeConverter should be used as the superclass.

Version:
  $Revision: 1.2 $ $Date: 2003/03/11 00:59:34 $
Author:
  Dmitri Plotnikov
See Also:
  `TypeUtils.setTypeConverter(org.apache.commons.jxpath.util.TypeConverter)`

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.

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.

### 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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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