docs: public static void setMetaClass(Class self, MetaClass metaClass) {
          final MetaClassRegistry metaClassRegistry = GroovySystem.getMetaClassRegistry();
          if (metaClass == null)
              metaClassRegistry.removeMetaClass(self);
          else {
              if (metaClass instanceof HandleMetaClass) {
                  metaClassRegistry.setMetaClass(self, ((HandleMetaClass)metaClass).getAdaptee());
              } else {
                  metaClassRegistry.setMetaClass(self, metaClass);
              }
              if (self==NullObject.class) {
                  NullObject.getNullObject().setMetaClass(metaClass);
              }
          }
      }