Class TypeBuilder

java.lang.Object
icu.easyj.core.util.TypeBuilder

public abstract class TypeBuilder extends Object
类型创建者
Author:
wangliang181230
  • Constructor Details

    • TypeBuilder

      public TypeBuilder()
  • Method Details

    • buildGeneric

      public static ParameterizedType buildGeneric(Class<?> rawType, Type ownerType, Type[] actualTypeArguments)
      创建泛型类型
      Parameters:
      rawType - 原始类型
      ownerType - 所有者类型
      actualTypeArguments - 泛型实际类型数组
      Returns:
      返回泛型类型
    • buildGeneric

      public static ParameterizedType buildGeneric(Class<?> rawType, Type... actualTypeArguments)
      创建泛型类型
      Parameters:
      rawType - 原始类型
      actualTypeArguments - 泛型实际类型数组
      Returns:
      返回泛型类型
    • buildList

      public static ParameterizedType buildList(Class<?> actualType)
      创建 List 泛型类型
      Parameters:
      actualType - 泛型参数实际类型
      Returns:
      返回 List 泛型类型
    • buildSet

      public static ParameterizedType buildSet(Class<?> actualType)
      创建 Set 泛型类型
      Parameters:
      actualType - 泛型参数实际类型
      Returns:
      返回 Set 泛型类型
    • buildMap

      public static ParameterizedType buildMap(Class<?> keyActualType, Class<?> valueActualType)
      创建 Map 泛型类型
      Parameters:
      keyActualType - 键泛型参数实际类型
      valueActualType - 值泛型参数实际类型
      Returns:
      返回 Map 泛型类型
      Since:
      0.6.6