* @param language current language
* @return script-engine for the given language
*/
public static ScriptEngine createScriptEngine(Class<? extends Language> language)
{
LanguageManager languageManager = CodiUtils.getContextualReferenceByClass(LanguageManager.class);
String languageName = languageManager.getLanguageName(language);
return getCurrentScriptEngineManager().getEngineByName(languageName);
}