java.lang.Object
org.seppiko.commons.utils.reflect.TypeUtil

public class TypeUtil extends Object
Type util
Author:
Leonard Woo
  • Method Details

    • checkType

      public static Class<?> checkType(Object obj)
      get Object type
      Parameters:
      obj - Object
      Returns:
      object type class
    • warpper

      public static Class<?> warpper(Class<?> type)
      get type boxing class
      Parameters:
      type - type class
      Returns:
      boxing class
    • parserNumberType

      public static TypeAndValue<?> parserNumberType(Number number)
      Parser number type.
      Parameters:
      number - number.
      Returns:
      number type and value.
    • convertObject

      public static <T> T convertObject(Object obj, Class<T> type) throws NullPointerException, IllegalArgumentException
      Convert Object to Class type.
      Type Parameters:
      T - type.
      Parameters:
      obj - object.
      type - target class type.
      Returns:
      Class type object.
      Throws:
      NullPointerException - sql object is null.
      IllegalArgumentException - target type mismatch.