类 ValueHandlerFactory


  • public class ValueHandlerFactory
    extends Object
    Helper for generically dealing with literal values.
    作者:
    Steve Ebersole
    • 方法详细资料

      • isCharacter

        public static boolean isCharacter​(Class type)
      • isCharacter

        public static boolean isCharacter​(Object value)
      • isNumeric

        public static boolean isNumeric​(Class type)
      • isNumeric

        public static boolean isNumeric​(Object value)
      • isBoolean

        public static boolean isBoolean​(Object value)
      • convert

        public static <T> T convert​(Object value,
                                    Class<T> targetType)
        Convert the given value into the specified target type.
        参数:
        value - The value to convert
        targetType - The type to which it should be converted
        返回:
        The converted value.
      • determineAppropriateHandler

        public static <T> ValueHandlerFactory.ValueHandler<T> determineAppropriateHandler​(Class<T> targetType)
        Determine the appropriate ValueHandlerFactory.ValueHandler strategy for converting a value to the given target type
        类型参数:
        T - parameterized type for the target type.
        参数:
        targetType - The target type (to which we want to convert values).
        返回:
        The conversion