public class TypeUtils extends Object
| Constructor and Description |
|---|
TypeUtils() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
static Class |
wrapPrimitive(Class p)
Return the appropriate wrapper type for the specified class.
|
public static void setTypeConverter(TypeConverter converter)
converter - new TypeConverterpublic static TypeConverter getTypeConverter()
public static boolean canConvert(Object object, Class toType)
object - object to testtoType - target classpublic static Object convert(Object object, Class toType)
object - object to converttoType - target classCopyright © 2001-2015 The Apache Software Foundation. All Rights Reserved.