org.apache.geronimo.gshell.expression
Class JexlExpressionEvaluator

java.lang.Object
  extended by org.apache.geronimo.gshell.expression.JexlExpressionEvaluator
All Implemented Interfaces:
ExpressionEvaluator

public class JexlExpressionEvaluator
extends Object
implements ExpressionEvaluator

A very simple expression evalutator using Jexl to do the hard work.

Version:
$Rev: 580765 $ $Date: 2007-09-30 11:52:39 -0700 (Sun, 30 Sep 2007) $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.geronimo.gshell.expression.ExpressionEvaluator
ExpressionEvaluator.SyntaxException
 
Constructor Summary
JexlExpressionEvaluator(Map vars)
           
JexlExpressionEvaluator(Variables vars)
           
 
Method Summary
protected  org.apache.commons.jexl.Expression createExpression(String expression)
           
 Object evaluate(String expression)
           
 Map getVariables()
           
 String parse(String input)
           
 String parse(String input, boolean trim)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JexlExpressionEvaluator

public JexlExpressionEvaluator(Map vars)

JexlExpressionEvaluator

public JexlExpressionEvaluator(Variables vars)
Method Detail

getVariables

public Map getVariables()

createExpression

protected org.apache.commons.jexl.Expression createExpression(String expression)
                                                       throws Exception
Throws:
Exception

evaluate

public Object evaluate(String expression)
                throws Exception
Specified by:
evaluate in interface ExpressionEvaluator
Throws:
Exception

parse

public String parse(String input)
             throws ExpressionEvaluator.SyntaxException
Specified by:
parse in interface ExpressionEvaluator
Throws:
ExpressionEvaluator.SyntaxException

parse

public String parse(String input,
                    boolean trim)
             throws ExpressionEvaluator.SyntaxException
Throws:
ExpressionEvaluator.SyntaxException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.