docs: public static Class<?> toClass(ClassFile ct, ClassLoader loader, ProtectionDomain domain) {
          try {
              byte[] b = ct.toBytecode();
              java.lang.reflect.Method method;
              Object[] args;
              if (domain == null) {
                  method = defineClass1;
                  args = new Object[] { ct.getName(), b, 0, b.length };
              } else {
                  method = defineClass2;
                  args = new Object[] { ct.getName(), b, 0, b.length, domain };
              }
  
              return toClass2(method, loader, args);
          } catch (RuntimeException e) {
              throw e;
          } catch (java.lang.reflect.InvocationTargetException e) {
              throw new RuntimeException(e.getTargetException());
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }