类 TypeUtils

java.lang.Object
cn.taketoday.util.TypeUtils

public abstract class TypeUtils extends Object
Utility to work with Java 5 generic type parameters. Mainly for internal use within the framework.
从以下版本开始:
4.0
作者:
Ramnivas Laddad, Juergen Hoeller, Chris Beams, TODAY 2021/9/6 22:29
  • 构造器详细资料

    • TypeUtils

      public TypeUtils()
  • 方法详细资料

    • isAssignable

      public static boolean isAssignable(Type lhsType, Type rhsType)
      Check if the right-hand side type may be assigned to the left-hand side type following the Java generics rules.
      参数:
      lhsType - the target type (left-hand side (LHS) type)
      rhsType - the value type (right-hand side (RHS) type) that should be assigned to the target type
      返回:
      true if rhsType is assignable to lhsType
      另请参阅:
    • isAssignable

      private static boolean isAssignable(ParameterizedType lhsType, ParameterizedType rhsType)
    • isAssignable

      private static boolean isAssignable(WildcardType lhsType, Type rhsType)
    • isNotAssignableBound

      public static boolean isNotAssignableBound(@Nullable Type lhsType, @Nullable Type rhsType)
    • getLowerBounds

      private static Type[] getLowerBounds(WildcardType wildcardType)
    • getUpperBounds

      private static Type[] getUpperBounds(WildcardType wildcardType)