code: public static List<ClassTypePair> getTypeArgumentAndClass(final Type type) throws IllegalArgumentException {
          final Type[] types = getTypeArguments(type);
          if (types == null) {
              return Collections.emptyList();
          }
  
          List<ClassTypePair> list = new ArrayList<>();
          for (Type t : types) {
              list.add(new ClassTypePair(erasure(t), t));
          }
          return list;
      }
docs: Get the list of class-type pairs that represent the type arguments of a
  {@link ParameterizedType parameterized} input type.
  <p>
  For any given {@link ClassTypePair#rawClass() class} part of each pair
  in the returned list, following rules apply:
  <ul>
  <li>If a type argument is a class then the class is returned as raw class.</li>
  <li>If the type argument is a generic array type and the generic component
  type is a class then class of the array is returned as raw class.</li>
  <li>If the type argument is a parameterized type and it's raw type is a
  class then that class is returned as raw class.</li>
  </ul>
  If the {@code type} is not an instance of ParameterizedType an empty
  list is returned.
  
  @param type parameterized type.
  @return the list of class-type pairs representing the actual type arguments.
  May be empty, but may never be {@code null}.
  @throws IllegalArgumentException if any of the generic type arguments is
  not a class, or a generic array type, or the generic component type
  of the generic array type is not class, or not a parameterized type
  with a raw type that is not a class.