class NameUtils {

  public static String approximatePTransformName(Class<?> clazz) {
    checkArgument(PTransform.class.isAssignableFrom(clazz));
    if (clazz.getSimpleName().startsWith("AutoValue_")) {
      return approximatePTransformName(clazz.getSuperclass());
    }
    return approximateSimpleName(clazz, /* dropOuterClassNames */ false)
        .replaceFirst("\\.Bound$", "");
  }

}