Package net.sourceforge.temply.base.rules

Examples of net.sourceforge.temply.base.rules.TemplyFunction.evaluate()


        for (TemplyFunctionExpression functionExp : _functionFinder.find(in)) {
            TemplyFunction function = _project.getRepository().getFunction(functionExp.getName());
            if (function == null) {
                throw new RuntimeException("Cannot find function \"" + functionExp.getName() + "\".");
            }
            Object result = function.evaluate(_project, functionExp.getArguments());
            if (result == null) {
                return null;
            }
            in = _functionFinder.replace(in, functionExp, result.toString());
        }
View Full Code Here


    Object runFunction(String name, Object[] args) {
        TemplyFunction function = _project.getRepository().getFunction(name);
        if (function == null) {
            throw new IllegalArgumentException("Cannot find function \"" + name + "\".");
        }
        return function.evaluate(_project, args);
    }
   
    public Rule addResolve(String resolveRuleName, String varName,
            String value, String category) {
        Rule resolveRule = _project.getRepository().getRule(resolveRuleName);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.