docs: public static void doSetMetaClass(Object self, MetaClass mc) {
          if (self instanceof GroovyObject) {
              DefaultGroovyMethods.setMetaClass((GroovyObject)self, mc);
          } else {
              DefaultGroovyMethods.setMetaClass(self, mc);
          }
      }