类 BshScriptEvaluator
java.lang.Object
cn.taketoday.scripting.bsh.BshScriptEvaluator
- 所有已实现的接口:
Aware,BeanClassLoaderAware,ScriptEvaluator
BeanShell-based implementation of Framework's
ScriptEvaluator strategy interface.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
Interpreter.eval(String)
-
构造器概要
构造器构造器说明Construct a new BshScriptEvaluator.BshScriptEvaluator(ClassLoader classLoader) Construct a new BshScriptEvaluator. -
方法概要
修饰符和类型方法说明evaluate(ScriptSource script) Evaluate the given script.evaluate(ScriptSource script, Map<String, Object> arguments) Evaluate the given script with the given arguments.voidsetBeanClassLoader(ClassLoader classLoader)
-
构造器详细资料
-
BshScriptEvaluator
public BshScriptEvaluator()Construct a new BshScriptEvaluator. -
BshScriptEvaluator
Construct a new BshScriptEvaluator.- 参数:
classLoader- the ClassLoader to use for theInterpreter
-
-
方法详细资料
-
setBeanClassLoader
- 指定者:
setBeanClassLoader在接口中BeanClassLoaderAware
-
evaluate
从接口复制的说明:ScriptEvaluatorEvaluate the given script.- 指定者:
evaluate在接口中ScriptEvaluator- 参数:
script- the ScriptSource for the script to evaluate- 返回:
- the return value of the script, if any
-
evaluate
从接口复制的说明:ScriptEvaluatorEvaluate the given script with the given arguments.- 指定者:
evaluate在接口中ScriptEvaluator- 参数:
script- the ScriptSource for the script to evaluatearguments- the key-value pairs to expose to the script, typically as script variables (may benullor empty)- 返回:
- the return value of the script, if any
-