public interface Script { public String execute(); }
public String execute() { return context.getScriptFile().getName(); }
import org.scripthelper.context.ScriptContext; import org.scripthelper.context.ScriptHelper; import org.scripthelper.context.DefaultScriptContext; import org.scripthelper.model.samples.Script; class GroovyClass implements org.scripthelper.model.samples.Script, org.scripthelper.context.ContextListener { DefaultScriptContext context; public void init(ScriptContext ctx) { context = (DefaultScriptContext)ctx; } public String execute() { return 10; } }
Copyright 2019-2020 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence