private GenerateResult generate(@Nonnull String script) {
		int hash = script.hashCode();
		GenerateResult result;
		if (RegexUtil.matchesAny(PATTERN_CLASS_NAME, script)) {
			logger.debugging(l -> l.info("Compiling script as class"));
			result = generateResultMap.computeIfAbsent(hash, n -> generateStandardClass(script));
		} else {
			logger.debugging(l -> l.info("Compiling script as function"));
			String className = "Script" + Math.abs(hash);
			result = generateResultMap.computeIfAbsent(hash, n -> generateScriptClass(className, script));
		}
		return result;
	}
Maps an input script to a full Java source file, and compiles it.
Delegates to either:
<ul>
    <li>{@link #generateScriptClass(String, String)}</li>
    <li>{@link #generateStandardClass(String)}</li>
</ul>

@param script
		Initial source of the script.

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