类 StandardScriptUtils
java.lang.Object
cn.taketoday.scripting.support.StandardScriptUtils
Common operations for dealing with a JSR-223
ScriptEngine.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static ScriptEngineretrieveEngineByName(ScriptEngineManager scriptEngineManager, String engineName) Retrieve aScriptEnginefrom the givenScriptEngineManagerby name, delegating toScriptEngineManager.getEngineByName(java.lang.String)but throwing a descriptive exception if not found or if initialization failed.
-
构造器详细资料
-
StandardScriptUtils
public StandardScriptUtils()
-
-
方法详细资料
-
retrieveEngineByName
public static ScriptEngine retrieveEngineByName(ScriptEngineManager scriptEngineManager, String engineName) Retrieve aScriptEnginefrom the givenScriptEngineManagerby name, delegating toScriptEngineManager.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 engine- 返回:
- a corresponding ScriptEngine (never
null) - 抛出:
IllegalArgumentException- if no matching engine has been foundIllegalStateException- if the desired engine failed to initialize
-