public abstract class StandardScriptUtils extends Object
ScriptEngine
.Constructor and Description |
---|
StandardScriptUtils() |
Modifier and Type | Method and Description |
---|---|
static ScriptEngine |
retrieveEngineByName(ScriptEngineManager scriptEngineManager,
String engineName)
Retrieve a
ScriptEngine from the given ScriptEngineManager
by name, delegating to ScriptEngineManager.getEngineByName(java.lang.String) but
throwing a descriptive exception if not found or if initialization failed. |
public static ScriptEngine retrieveEngineByName(ScriptEngineManager scriptEngineManager, String engineName)
ScriptEngine
from the given ScriptEngineManager
by name, delegating to ScriptEngineManager.getEngineByName(java.lang.String)
but
throwing a descriptive exception if not found or if initialization failed.scriptEngineManager
- the ScriptEngineManager to useengineName
- the name of the enginenull
)IllegalArgumentException
- if no matching engine has been foundIllegalStateException
- if the desired engine failed to initialize