Package org.apache.commons.jexl
Class JexlOne
java.lang.Object
org.apache.commons.jexl.JexlOne
- Direct Known Subclasses:
ExpressionFactory
,ScriptFactory
This implements Jexl-1.x (Jelly) compatible behaviors on top of Jexl-2.0.
- Since:
- 2.0
- Version:
- $Id$
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Expression
createExpression
(String expression) Deprecated.Create a JexlEngine and use createExpression() on thatstatic Script
createScript
(File scriptFile) Deprecated.Create a JexlEngine and use the createScript method on that instead.static Script
createScript
(String scriptText) Deprecated.Create a JexlEngine and use the createScript method on that instead.static Script
createScript
(URL scriptUrl) Deprecated.Create a JexlEngine and use the createScript method on that instead.
-
Constructor Details
-
JexlOne
protected JexlOne()Private constructor, ensure no instance.
-
-
Method Details
-
createScript
Deprecated.Create a JexlEngine and use the createScript method on that instead.Creates a Script from a String containing valid JEXL syntax. This method parses the script which validates the syntax.- Parameters:
scriptText
- A String containing valid JEXL syntax- Returns:
- A
Script
which can be executed with aJexlContext
. - Throws:
Exception
- An exception can be thrown if there is a problem parsing the script.
-
createScript
Deprecated.Create a JexlEngine and use the createScript method on that instead.Creates a Script from aFile
containing valid JEXL syntax. This method parses the script and validates the syntax.- Parameters:
scriptFile
- AFile
containing valid JEXL syntax. Must not be null. Must be a readable file.- Returns:
- A
Script
which can be executed with aJexlContext
. - Throws:
Exception
- An exception can be thrown if there is a problem parsing the script.
-
createScript
Deprecated.Create a JexlEngine and use the createScript method on that instead.Creates a Script from aURL
containing valid JEXL syntax. This method parses the script and validates the syntax.- Parameters:
scriptUrl
- AURL
containing valid JEXL syntax. Must not be null. Must be a readable file.- Returns:
- A
Script
which can be executed with aJexlContext
. - Throws:
Exception
- An exception can be thrown if there is a problem parsing the script.
-
createExpression
Deprecated.Create a JexlEngine and use createExpression() on thatCreates an Expression from a String containing valid JEXL syntax. This method parses the expression which must contain either a reference or an expression.- Parameters:
expression
- A String containing valid JEXL syntax- Returns:
- An Expression object which can be evaluated with a JexlContext
- Throws:
org.apache.commons.jexl2.JexlException
- An exception can be thrown if there is a problem parsing this expression, or if the expression is neither an expression or a reference.
-