org.apache.commons.jexl3
Interface Script

All Known Implementing Classes:
ExpressionImpl, JexlScript

public interface Script

A JEXL Script.

A script is some valid JEXL syntax to be executed with a given set of JexlContext variables.

A script is a group of statements, separated by semicolons.

The statements can be blocks (curly braces containing code), Control statements such as if and while as well as expressions and assignment statements.

Since:
1.1

Method Summary
 Object execute(JexlContext context)
          Executes the script with the variables contained in the supplied JexlContext.
 Object execute(JexlContext context, Object... args)
          Executes the script with the variables contained in the supplied JexlContext and a set of arguments corresponding to the parameters used during parsing.
 String getText()
          Returns the text of this Script.
 

Method Detail

execute

Object execute(JexlContext context)
Executes the script with the variables contained in the supplied JexlContext.

Parameters:
context - A JexlContext containing variables.
Returns:
The result of this script, usually the result of the last statement.

execute

Object execute(JexlContext context,
               Object... args)
Executes the script with the variables contained in the supplied JexlContext and a set of arguments corresponding to the parameters used during parsing.

Parameters:
context - A JexlContext containing variables.
args - the arguments
Returns:
The result of this script, usually the result of the last statement.
Since:
3.0

getText

String getText()
Returns the text of this Script.

Returns:
The script to be executed.


Copyright © 2001-2011 The Apache Software Foundation. All Rights Reserved.