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.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Convert the value to an object of the specified class (if possible). | |||||||||||
Convert the specified value into a String. | |||||||||||
Convert the specified value to an object of the specified class (if possible). | |||||||||||
Convert an array of specified values to an array of objects of the specified class (if possible). | |||||||||||
Remove any registered | |||||||||||
Remove all registered | |||||||||||
This method is deprecated.
Register replacement converters for Boolean.TYPE and
Boolean.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Byte.TYPE and
Byte.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Character.TYPE and
Character.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Double.TYPE and
Double.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Float.TYPE and
Float.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Integer.TYPE and
Integer.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Long.TYPE and
Long.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Short.TYPE and
Short.class instead
| |||||||||||
Look up and return any registered | |||||||||||
Look up and return any registered
Converter for the specified
source and destination class; if there is no registered Converter,
return null . | |||||||||||
Register a custom | |||||||||||
This method is deprecated.
Register replacement converters for Boolean.TYPE and
Boolean.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Byte.TYPE and
Byte.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Character.TYPE and
Character.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Double.TYPE and
Double.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Float.TYPE and
Float.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Integer.TYPE and
Integer.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Long.TYPE and
Long.class instead
| |||||||||||
This method is deprecated.
Register replacement converters for Short.TYPE and
Short.class instead
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Convert the value to an object of the specified class (if possible).
value | Value to be converted (may be null) |
---|---|
targetType | Class of the value to be converted to |
ConversionException | if thrown by an underlying Converter |
---|
Convert the specified value into a String.
For more details see ConvertUtilsBean
.
value | Value to be converted (may be null) |
---|
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
.
value | Value to be converted (may be null) |
---|---|
clazz | Java class to be converted to |
Convert an array of specified values to an array of objects of the specified class (if possible).
For more details see ConvertUtilsBean
.
values | Array of values to be converted |
---|---|
clazz | Java array or element class to be converted to |
Remove any registered Converter
for the specified destination
Class
.
For more details see ConvertUtilsBean
.
clazz | Class for which to remove a registered Converter |
---|
Remove all registered Converter
s, and re-establish the
standard Converters.
For more details see ConvertUtilsBean
.
This method is deprecated.
Register replacement converters for Boolean.TYPE and
Boolean.class instead
Gets the default value for Boolean conversions.
This method is deprecated.
Register replacement converters for Byte.TYPE and
Byte.class instead
Gets the default value for Byte conversions.
This method is deprecated.
Register replacement converters for Character.TYPE and
Character.class instead
Gets the default value for Character conversions.
This method is deprecated.
Register replacement converters for Double.TYPE and
Double.class instead
Gets the default value for Double conversions.
This method is deprecated.
Register replacement converters for Float.TYPE and
Float.class instead
Get the default value for Float conversions.
This method is deprecated.
Register replacement converters for Integer.TYPE and
Integer.class instead
Gets the default value for Integer conversions.
This method is deprecated.
Register replacement converters for Long.TYPE and
Long.class instead
Gets the default value for Long conversions.
This method is deprecated.
Register replacement converters for Short.TYPE and
Short.class instead
Gets the default value for Short conversions.
Look up and return any registered Converter
for the specified
source and destination class; if there is no registered Converter,
return null
.
sourceType | Class of the value being converted |
---|---|
targetType | Class of the value to be converted to |
Converter
or null
if not found
Register a custom Converter
for the specified destination
Class
, replacing any previously registered Converter.
For more details see ConvertUtilsBean
.
converter | Converter to be registered |
---|---|
clazz | Destination class for conversions performed by this Converter |
This method is deprecated.
Register replacement converters for Boolean.TYPE and
Boolean.class instead
Sets the default value for Boolean conversions.
newDefaultBoolean | The default Boolean value |
---|
This method is deprecated.
Register replacement converters for Byte.TYPE and
Byte.class instead
Sets the default value for Byte conversions.
newDefaultByte | The default Byte value |
---|
This method is deprecated.
Register replacement converters for Character.TYPE and
Character.class instead
Sets the default value for Character conversions.
newDefaultCharacter | The default Character value |
---|
This method is deprecated.
Register replacement converters for Double.TYPE and
Double.class instead
Sets the default value for Double conversions.
newDefaultDouble | The default Double value |
---|
This method is deprecated.
Register replacement converters for Float.TYPE and
Float.class instead
Sets the default value for Float conversions.
newDefaultFloat | The default Float value |
---|
This method is deprecated.
Register replacement converters for Integer.TYPE and
Integer.class instead
Sets the default value for Integer conversions.
newDefaultInteger | The default Integer value |
---|
This method is deprecated.
Register replacement converters for Long.TYPE and
Long.class instead
Sets the default value for Long conversions.
newDefaultLong | The default Long value |
---|
This method is deprecated.
Register replacement converters for Short.TYPE and
Short.class instead
Sets the default value for Short conversions.
newDefaultShort | The default Short value |
---|