Package org.apache.commons.jexl
Class JexlOne
- java.lang.Object
-
- org.apache.commons.jexl.JexlOne
-
- Direct Known Subclasses:
ExpressionFactory
,ScriptFactory
public class JexlOne extends java.lang.Object
This implements Jexl-1.x (Jelly) compatible behaviors on top of Jexl-2.0.- Since:
- 2.0
- Version:
- $Id$
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JexlOne()
Private constructor, ensure no instance.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Expression
createExpression(java.lang.String expression)
Deprecated.Create a JexlEngine and use createExpression() on thatstatic Script
createScript(java.io.File scriptFile)
Deprecated.Create a JexlEngine and use the createScript method on that instead.static Script
createScript(java.lang.String scriptText)
Deprecated.Create a JexlEngine and use the createScript method on that instead.static Script
createScript(java.net.URL scriptUrl)
Deprecated.Create a JexlEngine and use the createScript method on that instead.
-
-
-
Constructor Detail
-
JexlOne
protected JexlOne()
Private constructor, ensure no instance.
-
-
Method Detail
-
createScript
@Deprecated public static Script createScript(java.lang.String scriptText) throws java.lang.Exception
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:
java.lang.Exception
- An exception can be thrown if there is a problem parsing the script.
-
createScript
@Deprecated public static Script createScript(java.io.File scriptFile) throws java.lang.Exception
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:
java.lang.Exception
- An exception can be thrown if there is a problem parsing the script.
-
createScript
@Deprecated public static Script createScript(java.net.URL scriptUrl) throws java.lang.Exception
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:
java.lang.Exception
- An exception can be thrown if there is a problem parsing the script.
-
createExpression
@Deprecated public static Expression createExpression(java.lang.String expression)
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.
-
-