code: private static Class<?> getActualRawType(Type type) {
          Class<?> rawType;
          if (type instanceof ParameterizedType) {
              rawType = (Class<?>) ((ParameterizedType) type).getRawType();
          } else {
              rawType = (Class<?>) type;
          }
          return rawType;
      }
docs: Java's introspection API differentiates between a raw type and a generic (parameterized) type.
  To determine the actual raw type from a type, we need to take both cases into consideration.