docs: @SuppressWarnings("unchecked")
  	public static Type getSuperclassTypeParameter(Class<?> subclass) {
  		Type superclass = subclass.getGenericSuperclass();
  		if (superclass instanceof Class) {
  			throw new RuntimeException("Missing type parameter.");
  		}
  		return ((ParameterizedType) superclass).getActualTypeArguments()[0];
  	}