org.apache.commons.jxpath.util
Class TypeUtils
java.lang.Object
|
+--org.apache.commons.jxpath.util.TypeUtils
- public class TypeUtils
- extends java.lang.Object
Global type conversion utilities.
- Version:
- $Revision: 1.11 $ $Date: 2003/03/11 00:59:34 $
- Author:
- Dmitri Plotnikov
Method Summary |
static boolean |
canConvert(java.lang.Object object,
java.lang.Class toType)
Returns true if the global converter can convert the supplied
object to the specified type. |
static java.lang.Object |
convert(java.lang.Object object,
java.lang.Class toType)
Converts the supplied object to the specified type. |
static TypeConverter |
getTypeConverter()
Returns the current type converter. |
static void |
setTypeConverter(TypeConverter converter)
Install an alternative type converter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeUtils
public TypeUtils()
setTypeConverter
public static void setTypeConverter(TypeConverter converter)
- Install an alternative type converter.
getTypeConverter
public static TypeConverter getTypeConverter()
- Returns the current type converter.
canConvert
public static boolean canConvert(java.lang.Object object,
java.lang.Class toType)
- Returns true if the global converter can convert the supplied
object to the specified type.
convert
public static java.lang.Object convert(java.lang.Object object,
java.lang.Class toType)
- Converts the supplied object to the specified type. May
throw a RuntimeException.
Copyright © 2001-2003 Apache Software Foundation. All Rights Reserved.