- Revision
- 552
- Author
- mward
- Date
- 2008-01-16 20:55:01 -0600 (Wed, 16 Jan 2008)
Log Message
javadoc: documented objects in the 'bind' package
Modified Paths
- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/DefaultStringTransmuter.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverter.java
- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverterFinder.java
Diff
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/DefaultStringTransmuter.java (551 => 552)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/DefaultStringTransmuter.java 2008-01-17 02:52:06 UTC (rev 551) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/DefaultStringTransmuter.java 2008-01-17 02:55:01 UTC (rev 552) @@ -1,5 +1,9 @@ package org.codehaus.waffle.bind; +/** + * This implementation uses the [EMAIL PROTECTED] org.codehaus.waffle.bind.ValueConverterFinder} and its resulting + * [EMAIL PROTECTED] ValueConverter} to transform a String value into the specified type. + */ public class DefaultStringTransmuter implements StringTransmuter { private final ValueConverterFinder valueConverterFinder;
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java (551 => 552)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java 2008-01-17 02:52:06 UTC (rev 551) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/StringTransmuter.java 2008-01-17 02:55:01 UTC (rev 552) @@ -11,10 +11,17 @@ package org.codehaus.waffle.bind; /** - * This interface is used to simplify converting (transmuting) a String value into a given type. - * Should automatically determine the correct ValueConverter to use. + * Not to be confused with the [EMAIL PROTECTED] ValueConverter} this interface is used to simplify converting (transmuting) a + * String value into a given type. */ public interface StringTransmuter { + /** + * Convert (transmute) the string value into the Type requested + * + * @param value the String value + * @param toType the Object type + * @return The converted Object + */ <T> T transmute(String value, Class<T> toType); }
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverter.java (551 => 552)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverter.java 2008-01-17 02:52:06 UTC (rev 551) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverter.java 2008-01-17 02:55:01 UTC (rev 552) @@ -11,7 +11,8 @@ package org.codehaus.waffle.bind; /** - * Implementation of this interface will be responsible for converting values of specific type(s). + * Implementation of this interface will be responsible for converting String values to the specific type. These are + * registered with Waffle through the [EMAIL PROTECTED] web.xml}. * * @author Michael Ward * @author Mauro Talevi @@ -29,7 +30,8 @@ /** * Converts a String value to an Object of a given type * - * @param propertyName the associated property name, which can be <code>null</code> + * @param propertyName the associated property name, which can be <code>null</code>, also needed to present + * customized error messages. * @param value the String value * @param toType the Object type * @return The converted Object
Modified: trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverterFinder.java (551 => 552)
--- trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverterFinder.java 2008-01-17 02:52:06 UTC (rev 551) +++ trunk/waffle-core/src/main/java/org/codehaus/waffle/bind/ValueConverterFinder.java 2008-01-17 02:55:01 UTC (rev 552) @@ -11,12 +11,18 @@ package org.codehaus.waffle.bind; /** - * Finder interface for <code>ValueConverter</code>s registered per application. + * Finder interface for [EMAIL PROTECTED] ValueConverters} registered per application. * * @author Mauro Talevi */ public interface ValueConverterFinder { + /** + * Should return the [EMAIL PROTECTED] ValueConverter} that is responsible for handling the type passed in. + * + * @param type representing the ValueConverter needed + * @return the associated ValueConverter is returned or [EMAIL PROTECTED] null} if none was found. + */ ValueConverter findConverter(Class<?> type); }
To unsubscribe from this list please visit:
