Search in sources :

Example 1 with ExpressionContext

use of net.sourceforge.processdash.data.compiler.ExpressionContext in project processdash by dtuma.

the class DataRepository method evaluate.

public SimpleData evaluate(CompiledScript script, String prefix) throws ExecutionException {
    ListStack stack = new ListStack();
    ExpressionContext context = new SimpleExpressionContext(prefix);
    script.run(stack, context);
    SimpleData value = (SimpleData) stack.pop();
    if (value != null)
        value = (SimpleData) value.getEditable(false);
    return value;
}
Also used : ExpressionContext(net.sourceforge.processdash.data.compiler.ExpressionContext) ListStack(net.sourceforge.processdash.data.compiler.ListStack) SimpleData(net.sourceforge.processdash.data.SimpleData)

Aggregations

SimpleData (net.sourceforge.processdash.data.SimpleData)1 ExpressionContext (net.sourceforge.processdash.data.compiler.ExpressionContext)1 ListStack (net.sourceforge.processdash.data.compiler.ListStack)1