Author: skitching
Date: Thu Jun  9 01:05:39 2005
New Revision: 189729

URL: http://svn.apache.org/viewcvs?rev=189729&view=rev
Log:
Enhanced javadoc.

Modified:
    
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/StringConverter.java

Modified: 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/StringConverter.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/StringConverter.java?rev=189729&r1=189728&r2=189729&view=diff
==============================================================================
--- 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/StringConverter.java
 (original)
+++ 
jakarta/commons/proper/beanutils/trunk/src/java/org/apache/commons/beanutils/converters/StringConverter.java
 Thu Jun  9 01:05:39 2005
@@ -23,10 +23,25 @@
 
 
 /**
- * <p>Standard [EMAIL PROTECTED] Converter} implementation that converts an 
incoming
- * String into a <code>java.lang.String</code> object, optionally using a
- * default value or throwing a [EMAIL PROTECTED] ConversionException} if a 
conversion
- * error occurs.</p>
+ * Standard [EMAIL PROTECTED] Converter} implementation that converts an 
incoming
+ * object into a <code>java.lang.String</code> object.
+ * <p>
+ * 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).
+ * <p>
+ * 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.
+ * <p>
+ * 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$ $Date$



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to