use of aQute.bnd.service.Scripter in project bnd by bndtools.
the class Project method script.
@SuppressWarnings({ "unchecked", "rawtypes" })
public void script(String type, String script, Object... args) throws Exception {
// TODO check tyiping
List<Scripter> scripters = getPlugins(Scripter.class);
if (scripters.isEmpty()) {
msgs.NoScripters_(script);
return;
}
Properties p = new UTF8Properties(getProperties());
for (int i = 0; i < args.length; i++) p.setProperty("" + i, Converter.cnv(String.class, args[i]));
scripters.get(0).eval((Map) p, new StringReader(script));
}
Aggregations