code: public static LinkedHashMap<String, Type> resolveDirectRawGenerics(final Class<?> type) {
          final TypeVariable[] declaredGenerics = type.getTypeParameters();
          if (declaredGenerics.length == 0) {
              return EmptyGenericsMap.getInstance();
          }
          final LinkedHashMap<String, Type> res = new LinkedHashMap<String, Type>();
          final List<TypeVariable> failed = new ArrayList<TypeVariable>();
          // variables in declaration could be dependant and in any direction (e.g. <A extends List<B>, B>)
          // so assuming correct order at first, but if we face any error - order vars and resolve correctly
          // (it's better to avoid ordering by default as its required quite rarely)
          for (TypeVariable variable : declaredGenerics) {
              try {
                  res.put(variable.getName(), resolveRawGeneric(variable, res));
              } catch (UnknownGenericException ex) {
                  // preserve order without resolution
                  res.put(variable.getName(), null);
                  failed.add(variable);
              }
          }
          if (!failed.isEmpty()) {
              for (TypeVariable variable : GenericsUtils.orderVariablesForResolution(failed)) {
                  // replacing nulls in map
                  res.put(variable.getName(), resolveRawGeneric(variable, res));
              }
          }
          return res;
      }
docs: Resolve type generics by declaration (as upper bound). Used for cases when actual generic definition is not
  available (so actual generics are unknown). In most cases such generics resolved as Object
  (for example, {@code Some<T>}).
  <p>
  IMPORTANT: this method does not count possible outer class generics! Use
  {@link #resolveRawGeneric(TypeVariable, LinkedHashMap)} as universal resolution method
  
  @param type class to analyze generics for
  @return resolved generics or empty map if not generics used
  @see #resolveRawGenerics(Class) to include outer type generics