Example usage for javax.servlet.jsp.el FunctionMapper FunctionMapper

List of usage examples for javax.servlet.jsp.el FunctionMapper FunctionMapper

Introduction

In this page you can find the example usage for javax.servlet.jsp.el FunctionMapper FunctionMapper.

Prototype

FunctionMapper

Source Link

Usage

From source file:com.agilejava.docbkx.maven.ExpressionEvaluatorTest.java

/**
 * DOCUMENT ME!/*from  ww  w .j a  va 2  s .  c o m*/
 *
 * @throws ELException DOCUMENT ME!
 */
public void testEvaluator() throws ELException {
    ExpressionEvaluator evaluator = new ExpressionEvaluatorImpl();
    final Map foo = new HashMap();
    foo.put("bar", "whatever");

    Object result = evaluator.evaluate("${foo.bar}", Object.class, new VariableResolver() {
        public Object resolveVariable(String name) throws ELException {
            System.out.println(name);

            return foo;
        }
    }, new FunctionMapper() {
        public Method resolveFunction(String arg0, String arg1) {
            // TODO Auto-generated method stub
            return null;
        }
    });

    System.out.println(result);
}