code: public static boolean isMoreSpecific(final Type what, final Type comparingTo) {
          final ComparatorTypesVisitor visitor = new ComparatorTypesVisitor();
          TypesWalker.walk(what, comparingTo, visitor);
  
          if (!visitor.isCompatible()) {
              throw new IllegalArgumentException(String.format(
                      "Type %s can't be compared to %s because they are not compatible",
                      TypeToStringUtils.toStringTypeIgnoringVariables(what),
                      TypeToStringUtils.toStringTypeIgnoringVariables(comparingTo)));
          }
          return visitor.isMoreSpecific();
      }
docs: Checks if type is more specific than provided one. E.g. {@code ArrayList} is more specific then
  {@code List} or {@code List<Integer>} is more specific then {@code List<Object>}.
  <p>
  Note that comparison logic did not follow all java rules (especially wildcards) as some rules
  are not important at runtime.
  <p>
  Not resolved type variables are resolved to Object. Object is considered as unknown type: everything
  is assignable to Object and Object is assignable to everything.
  {@code List == List<Object> == List<?> == List<? super Object> == List<? extends Object>}.
  <p>
  For lower bounded wildcards more specific wildcard contains lower bound: {@code ? extends Number} is
  more specific then {@code ? extends Integer}. Also, lower bounded wildcard is always more specific then
  Object.
  <p>
  Not the same as {@link #isAssignable(Type, Type)}. For example:
  {@code isAssignable(List, List<String>) == true}, but {@code isMoreSpecific(List, List<String>) == false}.
  <p>
  Primitive types are checked as wrappers (for example, int is more specific then Number).
  
  @param what        type to check
  @param comparingTo type to compare to
  @return true when provided type is more specific than other type. false otherwise
  @throws IllegalArgumentException when types are not compatible
  @see ComparatorTypesVisitor for implementation details
  @see #isCompatible(Type, Type) use for compatibility check (before) to avoid incompatible types exception