docs: public static Class<?> compileOnDisk(final String className, final Map<String, CharSequence> sources)
          throws ClassNotFoundException, IOException
      {
          final JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
          if (null == compiler)
          {
              throw new IllegalStateException("JDK required to run tests. JRE is not sufficient.");
          }
  
          final DiagnosticCollector<JavaFileObject> diagnostics = new DiagnosticCollector<>();
          try (StandardJavaFileManager fileManager = compiler.getStandardFileManager(null, null, null))
          {
              final ArrayList<String> options = new ArrayList<>(Arrays.asList(
                  "-classpath", System.getProperty("java.class.path") + File.pathSeparator + TEMP_DIR_NAME));
  
              final Collection<File> files = persist(sources);
              final Iterable<? extends JavaFileObject> compilationUnits = fileManager.getJavaFileObjectsFromFiles(files);
              final JavaCompiler.CompilationTask task = compiler.getTask(
                  null, fileManager, diagnostics, options, null, compilationUnits);
  
              return compileAndLoad(className, diagnostics, fileManager, task);
          }
      }