code: public static boolean isAssignableTo(final String leftType, final String rightType) {
          if (leftType.equals(rightType))
              return true;
  
          final boolean firstTypeArray = leftType.charAt(0) == '[';
          if (firstTypeArray ^ rightType.charAt(0) == '[') {
              return false;
          }
  
          final Class<?> leftClass = loadClassFromType(leftType);
          final Class<?> rightClass = loadClassFromType(rightType);
          if (leftClass == null || rightClass == null)
              return false;
  
          final boolean bothTypesParameterized = hasTypeParameters(leftType) && hasTypeParameters(rightType);
          return rightClass.isAssignableFrom(leftClass) && (firstTypeArray || !bothTypesParameterized || getTypeParameters(leftType).equals(getTypeParameters(rightType)));
      }
docs: Checks if the left type is assignable to the right type, i.e. the right type is of the same or a sub-type.