docs: public static Class<?> toClass(ClassFile ct, Class<?> originalClass, ProxyServices proxyServices, ProtectionDomain domain) {
          try {
              byte[] bytecode = ct.toBytecode();
              Class<?> result;
              if (domain == null) {
                  result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length);
              } else {
                  result = proxyServices.defineClass(originalClass, ct.getName(), bytecode, 0, bytecode.length, domain);
              }
              return result;
          } catch (RuntimeException e) {
              throw e;
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }