null
, ���׳���Ĭ��ֵ��ConvertFailedException
. toString()
. Well ok, it doesn't actually do any conversion. The converter uses by default a map with weak references to reuse instances of strings that do not exceed a length limit. This limit is by default 38 characters to cache typical strings containing UUIDs. Only shorter strings are typically repeated more often in XML values.
@author Joe Walnes @author Rene Schwietzke @author Jörg SchaibleString
. Conversion rules: null
value is returned as null
CharSequence
type returns toString valueClass
returns cass namebyte[]
is used for creating UTF8 stringchar[]
is used for creating stringClob
is convertedtoString()
value is returned.java.lang.String
object. Note that ConvertUtils really is designed to do string->object conversions, and offers very little support for object->string conversions. The ConvertUtils/ConvertUtilsBean methods only select a converter to apply based upon the target type being converted to, and generally assume that the input is a string (by calling its toString method if needed).
This class is therefore just a dummy converter that converts its input into a string by calling the input object's toString method and returning that value.
It is possible to replace this converter with something that has a big if/else statement that selects behaviour based on the real type of the object being converted (or possibly has a map of converters, and looks them up based on the class of the input object). However this is not part of the existing ConvertUtils framework. @author Craig R. McClanahan @version $Revision: 640131 $ $Date: 2008-03-23 02:10:31 +0000 (Sun, 23 Mar 2008) $ @since 1.3
java.lang.String
object. Note that ConvertUtils really is designed to do string->object conversions, and offers very little support for object->string conversions. The ConvertUtils/ConvertUtilsBean methods only select a converter to apply based upon the target type being converted to, and generally assume that the input is a string (by calling its toString method if needed).
This class is therefore just a dummy converter that converts its input into a string by calling the input object's toString method and returning that value.
It is possible to replace this converter with something that has a big if/else statement that selects behaviour based on the real type of the object being converted (or possibly has a map of converters, and looks them up based on the class of the input object). However this is not part of the existing ConvertUtils framework. @author Craig R. McClanahan @version $Revision: 690380 $ $Date: 2008-08-29 21:04:38 +0100 (Fri, 29 Aug 2008) $ @since 1.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|