docs: @SuppressWarnings("unchecked")
      public static <T> T getAsType(Object self, Class<T> clazz) {
          if (self instanceof GeneratedGroovyProxy) {
              Object proxyTarget = ((GeneratedGroovyProxy)self).getProxyTarget();
              if (clazz.isAssignableFrom(proxyTarget.getClass())) {
                  return (T) proxyTarget;
              }
          }
          return DefaultGroovyMethods.asType(self, clazz);
      }