|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.commons.beanutils.ConvertUtils
Utility methods for converting String scalar values to objects of the specified Class, String arrays to arrays of the specified Class.
For more details, see ConvertUtilsBean
which provides the
implementations for these methods.
ConvertUtilsBean
Constructor Summary | |
ConvertUtils()
|
Method Summary | |
static java.lang.String |
convert(java.lang.Object value)
Convert the specified value into a String. |
static java.lang.Object |
convert(java.lang.String[] values,
java.lang.Class clazz)
Convert an array of specified values to an array of objects of the specified class (if possible). |
static java.lang.Object |
convert(java.lang.String value,
java.lang.Class clazz)
Convert the specified value to an object of the specified class (if possible). |
static void |
deregister()
Remove all registered Converter s, and re-establish the
standard Converters. |
static void |
deregister(java.lang.Class clazz)
Remove any registered Converter for the specified destination
Class . |
static boolean |
getDefaultBoolean()
Deprecated. Register replacement converters for Boolean.TYPE and Boolean.class instead |
static byte |
getDefaultByte()
Deprecated. Register replacement converters for Byte.TYPE and Byte.class instead |
static char |
getDefaultCharacter()
Deprecated. Register replacement converters for Character.TYPE and Character.class instead |
static double |
getDefaultDouble()
Deprecated. Register replacement converters for Double.TYPE and Double.class instead |
static float |
getDefaultFloat()
Deprecated. Register replacement converters for Float.TYPE and Float.class instead |
static int |
getDefaultInteger()
Deprecated. Register replacement converters for Integer.TYPE and Integer.class instead |
static long |
getDefaultLong()
Deprecated. Register replacement converters for Long.TYPE and Long.class instead |
static short |
getDefaultShort()
Deprecated. Register replacement converters for Short.TYPE and Short.class instead |
static Converter |
lookup(java.lang.Class clazz)
Look up and return any registered Converter for the specified
destination class; if there is no registered Converter, return
null . |
static void |
register(Converter converter,
java.lang.Class clazz)
Register a custom Converter for the specified destination
Class , replacing any previously registered Converter. |
static void |
setDefaultBoolean(boolean newDefaultBoolean)
Deprecated. Register replacement converters for Boolean.TYPE and Boolean.class instead |
static void |
setDefaultByte(byte newDefaultByte)
Deprecated. Register replacement converters for Byte.TYPE and Byte.class instead |
static void |
setDefaultCharacter(char newDefaultCharacter)
Deprecated. Register replacement converters for Character.TYPE and Character.class instead |
static void |
setDefaultDouble(double newDefaultDouble)
Deprecated. Register replacement converters for Double.TYPE and Double.class instead |
static void |
setDefaultFloat(float newDefaultFloat)
Deprecated. Register replacement converters for Float.TYPE and Float.class instead |
static void |
setDefaultInteger(int newDefaultInteger)
Deprecated. Register replacement converters for Integer.TYPE and Integer.class instead |
static void |
setDefaultLong(long newDefaultLong)
Deprecated. Register replacement converters for Long.TYPE and Long.class instead |
static void |
setDefaultShort(short newDefaultShort)
Deprecated. Register replacement converters for Short.TYPE and Short.class instead |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ConvertUtils()
Method Detail |
public static boolean getDefaultBoolean()
public static void setDefaultBoolean(boolean newDefaultBoolean)
public static byte getDefaultByte()
public static void setDefaultByte(byte newDefaultByte)
public static char getDefaultCharacter()
public static void setDefaultCharacter(char newDefaultCharacter)
public static double getDefaultDouble()
public static void setDefaultDouble(double newDefaultDouble)
public static float getDefaultFloat()
public static void setDefaultFloat(float newDefaultFloat)
public static int getDefaultInteger()
public static void setDefaultInteger(int newDefaultInteger)
public static long getDefaultLong()
public static void setDefaultLong(long newDefaultLong)
public static short getDefaultShort()
public static void setDefaultShort(short newDefaultShort)
public static java.lang.String convert(java.lang.Object value)
Convert the specified value into a String.
For more details see ConvertUtilsBean
.
ConvertUtilsBean.convert(Object)
public static java.lang.Object convert(java.lang.String value, java.lang.Class clazz)
Convert the specified value to an object of the specified class (if possible). Otherwise, return a String representation of the value.
For more details see ConvertUtilsBean
.
ConvertUtilsBean.convert(String, Class)
public static java.lang.Object convert(java.lang.String[] values, java.lang.Class clazz)
Convert an array of specified values to an array of objects of the specified class (if possible).
For more details see ConvertUtilsBean
.
ConvertUtilsBean.convert(String[], Class)
public static void deregister()
Remove all registered Converter
s, and re-establish the
standard Converters.
For more details see ConvertUtilsBean
.
ConvertUtilsBean.deregister()
public static void deregister(java.lang.Class clazz)
Remove any registered Converter
for the specified destination
Class
.
For more details see ConvertUtilsBean
.
ConvertUtilsBean.deregister(Class)
public static Converter lookup(java.lang.Class clazz)
Look up and return any registered Converter
for the specified
destination class; if there is no registered Converter, return
null
.
For more details see ConvertUtilsBean
.
ConvertUtilsBean.lookup(Class)
public static void register(Converter converter, java.lang.Class clazz)
Register a custom Converter
for the specified destination
Class
, replacing any previously registered Converter.
For more details see ConvertUtilsBean
.
ConvertUtilsBean.register(Converter, Class)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |