程序包 dev.utils.common

类 TypeUtils

java.lang.Object
dev.utils.common.TypeUtils

public final class TypeUtils extends Object
detail: 类型工具类
作者:
Ttt
     Java 中与泛型相关的接口之 ParameterizedType
另请参阅:
  • 方法详细资料

    • getArrayType

      public static Type getArrayType(Type type)
      获取 Array Type
      参数:
      type - Bean.class
      返回:
      Bean[] Type
    • getListType

      public static Type getListType(Type type)
      获取 List Type
      参数:
      type - Bean.class
      返回:
      List Type
    • getSetType

      public static Type getSetType(Type type)
      获取 Set Type
      参数:
      type - Bean.class
      返回:
      Set Type
    • getMapType

      public static Type getMapType(Type keyType, Type valueType)
      获取 Map Type
      参数:
      keyType - Key.class
      valueType - Value.class
      返回:
      Map<Key, Value> Type
    • getType

      public static Type getType(Type rawType, Type... typeArguments)
      获取 Type
      参数:
      rawType - raw type
      typeArguments - type arguments
      返回:
      Type