提交 3d318ea3 编写于 作者: K Keith Donald

javadoc polishing

上级 9216b3e8
......@@ -89,8 +89,8 @@ public class ConversionExecutionException extends ConversionException {
}
private static String defaultMessage(Object value, Class<?> sourceClass, Class<?> targetClass, Throwable cause) {
return "Unable to convert value " + StylerUtils.style(value) + " from type '" + sourceClass.getName()
+ "' to type '" + targetClass.getName() + "'; reason = '" + cause.getMessage() + "'";
return "Unable to convert value " + StylerUtils.style(value) + " from type [" + sourceClass.getName()
+ "] to type [" + targetClass.getName() + "]; reason = '" + cause.getMessage() + "'";
}
}
\ No newline at end of file
......@@ -18,9 +18,9 @@ package org.springframework.core.convert.converter;
import org.springframework.util.NumberUtils;
/**
*Converts from any JDK-standard Number implementation to any other JDK-standard Number implementation.
* Converts from any JDK-standard Number implementation to any other JDK-standard Number implementation.
*
* Support Number classes include byte, short, integer, float, double, long, big integer, big decimal. This class
* Support Number classes including Byte, Short, Integer, Float, Double, Long, BigInteger, BigDecimal. This class
* delegates to {@link NumberUtils#convertNumberToTargetClass(Number, Class)} to perform the conversion.
*
* @see java.lang.Byte
......@@ -31,6 +31,7 @@ import org.springframework.util.NumberUtils;
* @see java.lang.Float
* @see java.lang.Double
* @see java.math.BigDecimal
* @see NumberUtils
*
* @author Keith Donald
*/
......
......@@ -18,7 +18,7 @@ package org.springframework.core.convert.converter;
import java.math.BigDecimal;
/**
* Converts a String to a BigDecimal and back.
* Converts a String to a BigDecimal using {@link BigDecimal#BigDecimal(String).
*
* @author Keith Donald
*/
......
......@@ -18,7 +18,7 @@ package org.springframework.core.convert.converter;
import java.math.BigInteger;
/**
* Converts a String to a BigInteger and back.
* Converts a String to a BigInteger using {@link BigInteger#BigInteger(String)}.
*
* @author Keith Donald
*/
......
......@@ -16,8 +16,9 @@
package org.springframework.core.convert.converter;
/**
* Converts String to a Boolean and back.
* Converts String to a Boolean. The trueString and falseStrings are configurable.
*
* @see #StringToBoolean(String, String)
* @author Keith Donald
*/
public class StringToBoolean implements Converter<String, Boolean> {
......@@ -31,7 +32,7 @@ public class StringToBoolean implements Converter<String, Boolean> {
private String falseString;
/**
* Create a StringToBoolean converter.
* Create a StringToBoolean converter with the default 'true' and 'false' strings.
*/
public StringToBoolean() {
}
......
......@@ -16,7 +16,7 @@
package org.springframework.core.convert.converter;
/**
* Converts a String to a Double and back.
* Converts a String to a Double using {@link Double#valueOf(String)}.
*
* @author Keith Donald
*/
......
......@@ -16,9 +16,9 @@
package org.springframework.core.convert.converter;
/**
* Converts from a String to Enum and back.
* Converts from a String to Enum using {@link Enum#valueOf(Class, String)}.
*
* @author Scott Andrews
* @author Keith Donald
*/
@SuppressWarnings("unchecked")
public class StringToEnum implements SuperConverter<String, Enum> {
......
......@@ -16,7 +16,7 @@
package org.springframework.core.convert.converter;
/**
* Converts a String to an Short using {@link Short#valueOf(String)}.
* Converts a String to Float using {@link Float#valueOf(String)}.
*
* @author Keith Donald
*/
......
......@@ -16,7 +16,7 @@
package org.springframework.core.convert.converter;
/**
* Converts a String to an Long using {@link Long#valueOf(String)}.
* Converts a String to a Long using {@link Long#valueOf(String)}.
*
* @author Keith Donald
*/
......
......@@ -16,7 +16,7 @@
package org.springframework.core.convert.converter;
/**
* Converts a String to an Short using {@link Short#valueOf(String)}.
* Converts a String to a Short using {@link Short#valueOf(String)}.
*
* @author Keith Donald
*/
......
......@@ -20,7 +20,7 @@ import org.springframework.core.convert.ConversionService;
/**
* A super converter converts a source object of type S to a target type of type AT and back, where AT is equal to or a
* subclass of T.
* subclass of T, T being the "super" target type. This allows a single converter to convert to objects that are part of a common class hierarchy.
* <p>
* Implementations of this interface are thread-safe and can be shared. Converters are typically registered with and
* accessed through a {@link ConversionService}.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册