docs: private static void addClass(Class<?> userClass, KieFileSystem kfs) {
          String classSimpleName = userClass.getSimpleName();
          
          URL classFileUrl = userClass.getResource(classSimpleName + ".class");
          if( classFileUrl == null ) { 
              throw new RuntimeException("Class " + userClass.getCanonicalName() + " can not be found on the classpath." );
          }
      
          byte[] classByteCode = null;
          if ("file".equalsIgnoreCase(classFileUrl.getProtocol())) {
              File classFile = new File(classFileUrl.getPath());
              if( ! classFile.exists() ) { 
                  throw new RuntimeException("Unable to find path for class " + userClass.getCanonicalName() 
                          + " that should be here: " + classFileUrl.toExternalForm());
              }
      
              try {
                  classByteCode = readStream(new FileInputStream(classFile));
              } catch (Exception e) {
                  throw new RuntimeException("Unable to read in " + classFile.getAbsolutePath(), e);
              }
              if( classByteCode.length == 0 ) { 
                  throw new RuntimeException("No bytes retrieved from " + classFile.getAbsolutePath() );
              }
          } else if ("jar".equalsIgnoreCase(classFileUrl.getProtocol())) {
              // file:/opt/mavenRepository/org/kie/tests/kie-wb-tests-base/6.0.0-SNAPSHOT/kie-wb-tests-base-6.0.0-SNAPSHOT.jar!/org/kie/tests/wb/base/test/MyType.class
              String path = classFileUrl.getPath();
              int bangIndex = path.indexOf('!');
              String jarPath = path.substring("file:".length(), bangIndex);
              String classPath = path.substring(bangIndex+2); // no base /
              try (ZipFile zipFile = new ZipFile(new File(jarPath))) {
                  ZipEntry entry = zipFile.getEntry(classPath);
                  InputStream zipStream = zipFile.getInputStream(entry);
                  // the zipStream is closed as part of the readStream() method
                  classByteCode = readStream(zipStream);
              } catch (Exception e) {
                  throw new RuntimeException("Unable to read from " + jarPath, e);
              }
          }
  
          String pkgFolder = userClass.getPackage().toString();
  
          // @#$%ing Eclipe classloader!! The following 2 lines "normalize" the package name from what Eclipse (and other IDE's?) do with it
          pkgFolder = pkgFolder.replace("package ", "");
          pkgFolder = pkgFolder.replaceAll(",.+$", "");
          pkgFolder = pkgFolder.replaceAll("\\.", "/" );
          String classFilePath = pkgFolder + "/" + classSimpleName + ".class";
  
          if( classFilePath.contains(" " ) ) { 
              throw new RuntimeException("Invalid class name ('" + classFilePath + "'), contact the developers.");
          }
      
          kfs.write(classFilePath, classByteCode);
      }