class ScriptExecutorFactory {

	private static ScriptExecutorFactory scriptExecutorFactory;

	private final Map<String, ScriptExecutor> scriptExecutorMap = new HashMap<>();

	private final String NONE_LANGUAGE = "none";

	public static ScriptExecutorFactory loadInstance() {<FILL_FUNCTION_BODY>}

	public ScriptExecutor getScriptExecutor(String language) {
		if (StrUtil.isBlank(language)) {
			language = NONE_LANGUAGE;
		}

		if (!scriptExecutorMap.containsKey(language)) {
			ServiceLoader<ScriptExecutor> loader = ServiceLoader.load(ScriptExecutor.class);

			ScriptExecutor scriptExecutor;
			Iterator<ScriptExecutor> it = loader.iterator();
			while (it.hasNext()) {
				scriptExecutor = it.next().init();
				if (language.equals(NONE_LANGUAGE)) {
					scriptExecutorMap.put(language, scriptExecutor);
					break;
				}
				else {
					ScriptTypeEnum scriptType = ScriptTypeEnum.getEnumByDisplayName(language);
					if (ObjectUtil.isNull(scriptType)) {
						throw new ScriptSpiException("script language config error");
					}
					if (scriptType.equals(scriptExecutor.scriptType())) {
						scriptExecutorMap.put(language, scriptExecutor);
						break;
					}
				}
			}
		}

		if (scriptExecutorMap.containsKey(language)) {
			return scriptExecutorMap.get(language);
		}
		else {
			throw new ScriptSpiException("script spi component failed to load");
		}
	}

	public void cleanScriptCache() {
		this.scriptExecutorMap.forEach((key, value) -> value.cleanCache());
	}

}

		if (ObjectUtil.isNull(scriptExecutorFactory)) {
			scriptExecutorFactory = new ScriptExecutorFactory();
		}
		return scriptExecutorFactory;
	
<no_super_class>