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.
$Revision: 1.13 $ $Date: 2004/02/29 14:17:43 $static boolean | canConvert(Object object, Class toType) - Returns true if the global converter can convert the supplied
object to the specified type.
|
static Object | convert(Object object, 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.
|
canConvert
public static boolean canConvert(Object object,
Class toType)
Returns true if the global converter can convert the supplied
object to the specified type.
convert
public static Object convert(Object object,
Class toType)
Converts the supplied object to the specified type. May
throw a RuntimeException.
getTypeConverter
public static TypeConverter getTypeConverter()
Returns the current type converter.
setTypeConverter
public static void setTypeConverter(TypeConverter converter)
Install an alternative type converter.