docs: @SuppressWarnings("unchecked")
      public GroovyObject instantiateDelegateWithBaseClass(Map closureMap, List<Class> interfaces, Object delegate, Class baseClass, String name) {
          Map<Object,Object> map = closureMap != null ? closureMap : EMPTY_CLOSURE_MAP;
          ProxyGeneratorAdapter adapter = createAdapter(map, interfaces, delegate.getClass(), baseClass);
  
          return adapter.delegatingProxy(delegate, map, (Object[])null);
      }