@Nonnull
	private GenerateResult generate(@Nonnull String className,
									@Nonnull String originalSource,
									@Nonnull String compileSource) {
		JavacArguments args = new JavacArgumentsBuilder()
				.withClassName(className)
				.withClassSource(compileSource)
				.build();
		CompilerResult result = compiler.compile(args, null, null);
		if (result.wasSuccess()) {
			try {
				Map<String, byte[]> classes = result.getCompilations().entrySet().stream()
						.collect(Collectors.toMap(e -> e.getKey().replace('/', '.'), Map.Entry::getValue));
				ClassDefiner definer = new ClassDefiner(classes);
				Class<?> cls = definer.findClass(className.replace('/', '.'));
				return new GenerateResult(cls, mapDiagnostics(originalSource, compileSource, result.getDiagnostics()));
			} catch (Exception ex) {
				logger.error("Failed to define generated script class", ex);
			}
		}
		return new GenerateResult(null, mapDiagnostics(originalSource, compileSource, result.getDiagnostics()));
	}
@param className
		Name of the script class.
@param originalSource
		Original source provided by the user.
@param compileSource
		Full source of the script to pass to the compiler.

@return Compiler result wrapper containing the loaded class reference.
recaf-core/src/main/java/software/coley/recaf/services/script/JavacScriptEngine.java