code: public static boolean isRawType(final Type type) {
          if (type instanceof Class) {
              final Class<?> clazz = (Class<?>) type;
              return (clazz.getTypeParameters().length > 0);
          }
          if (type instanceof ParameterizedType) {
              final ParameterizedType ptype = (ParameterizedType) type;
              return (ptype.getActualTypeArguments().length == 0);
          }
          return false;
      }
docs: Checks if a given type is a raw type.
  
  @param type
  @return true if and only if the type may be parameterized but has no parameter type.