提交 3f4425f5 编写于 作者: K kohsuke

added a version that takes Binding.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6082 71c3de6d-444a-0410-be80-ed276b4c234a
上级 69a2461d
......@@ -119,7 +119,13 @@ public class BeanBuilder extends GroovyObjectSupport {
* Parses the bean definition groovy script.
*/
public void parse(InputStream script) {
Binding binding = new Binding();
parse(script,new Binding());
}
/**
* Parses the bean definition groovy script by first exporting the given {@link Binding}.
*/
public void parse(InputStream script, Binding binding) {
CompilerConfiguration cc = new CompilerConfiguration();
cc.setScriptBaseClass(ClosureScript.class.getName());
GroovyShell shell = new GroovyShell(binding,cc);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册