code: public static Class<?>[] resolveRawArguments(Type genericType, Class<?> subType) {
      Class<?>[] result = null;
      Class<?> functionalInterface = null;
  
      // Handle lambdas
      if (RESOLVES_LAMBDAS && subType.isSynthetic()) {
        Class<?> fi = genericType instanceof ParameterizedType
            && ((ParameterizedType) genericType).getRawType() instanceof Class
                ? (Class<?>) ((ParameterizedType) genericType).getRawType()
                : genericType instanceof Class ? (Class<?>) genericType : null;
        if (fi != null && fi.isInterface())
          functionalInterface = fi;
      }
  
      if (genericType instanceof ParameterizedType) {
        ParameterizedType paramType = (ParameterizedType) genericType;
        Type[] arguments = paramType.getActualTypeArguments();
        result = new Class[arguments.length];
        for (int i = 0; i < arguments.length; i++)
          result[i] = resolveRawClass(arguments[i], subType, functionalInterface);
      } else if (genericType instanceof TypeVariable) {
        result = new Class[1];
        result[0] = resolveRawClass(genericType, subType, functionalInterface);
      } else if (genericType instanceof Class) {
        TypeVariable<?>[] typeParams = ((Class<?>) genericType).getTypeParameters();
        result = new Class[typeParams.length];
        for (int i = 0; i < typeParams.length; i++)
          result[i] = resolveRawClass(typeParams[i], subType, functionalInterface);
      }
  
      return result;
    }
docs: Returns an array of raw classes representing arguments for the {@code genericType} using type variable information
  from the {@code subType}. Arguments for {@code genericType} that cannot be resolved are returned as
  {@code Unknown.class}. If no arguments can be resolved then {@code null} is returned.
  
  @param genericType to resolve arguments for
  @param subType to extract type variable information from
  @return array of raw classes representing arguments for the {@code genericType} else {@code null} if no type
  arguments are declared