Package org.apache.dubbo.common.utils
Class CompatibleTypeUtils
java.lang.Object
org.apache.dubbo.common.utils.CompatibleTypeUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectcompatibleTypeConvert(Object value, Class<?> type) Compatible type convert.
-
Method Details
-
compatibleTypeConvert
Compatible type convert. Null value is allowed to pass in. If no conversion is needed, then the original value will be returned.Supported compatible type conversions include (primary types and corresponding wrappers are not listed):
- String -> char, enum, Date
- byte, short, int, long -> byte, short, int, long
- float, double -> float, double
-