code: public static Class[] resolveUpperBounds(final Type type, final Map<String, Type> generics) {
          final Class[] res;
          if (type instanceof WildcardType) {
              final List<Class> list = new ArrayList<Class>();
              for (Type t : ((WildcardType) type).getUpperBounds()) {
                  final Class<?> bound = resolveClass(t, generics);
                  // possible case: T extends K & Serializable - if T unknown then it become
                  // T extends Object & Serializable
                  if (bound != Object.class) {
                      list.add(bound);
                  }
              }
              if (list.isEmpty()) {
                  list.add(Object.class);
              }
              res = list.toArray(new Class[0]);
          } else {
              // get rid of primitive to simplify comparison logic
              res = new Class[]{TypeUtils.wrapPrimitive(resolveClass(type, generics))};
          }
          return res;
      }
docs: In most cases {@link #resolveClass(Type, Map)} could be used instead (for simplicity). This method will
  only return different result for wildcards inside resolved types (where generics are replaced
  {@link #resolveTypeVariables(Type, Map)}). Also, in contrast to {@link #resolveClass(Type, Map)},
  method will replace primitive types with wrappers (int -&gt; Integer etc.) because this method is used mostly for
  comparison logic and avoiding primitives simplifies it.
  <p>
  Wildcards are used to store raw resolution of generic declaration {@code T extends Number & Comparable}
  (but {@code ? extends Number & Comparable} is not allowed in java). Only for this case multiple bounds
  will be returned.
  <p>
  That precision may be important only for exact types compatibility logic.
  
  @param type     type to resolve upper bounds
  @param generics known generics
  @return resolved upper bounds (at least one class)
  @throws UnknownGenericException when found generic not declared on type (e.g. method generic)
  @see TypeUtils#isAssignableBounds(Class[], Class[]) supplement check method