code: public static Class<?> getRawClass(Type type) {
          if (type instanceof Class) {
              return (Class<?>) type;
          }
          if (type instanceof ParameterizedType) {
              return (Class<?>) ((ParameterizedType) type).getRawType();
          }
          if (type instanceof TypeVariable) {
              Type[] bounds = ((TypeVariable) type).getBounds();
              if (null != bounds && 0 < bounds.length) {
                  return getRawClass(bounds[0]);
              }
          }
          return Object.class;
      }
docs: Get the main class (raw type) for a {@łink Type}.
  
  @param type type to get class for
  @return class