Class JexlOne

java.lang.Object
org.apache.commons.jexl.JexlOne
Direct Known Subclasses:
ExpressionFactory, ScriptFactory

public class JexlOne extends Object
This implements Jexl-1.x (Jelly) compatible behaviors on top of Jexl-2.0.
Since:
2.0
Version:
$Id$
  • Constructor Details

    • JexlOne

      protected JexlOne()
      Private constructor, ensure no instance.
  • Method Details

    • createScript

      @Deprecated public static Script createScript(String scriptText) throws 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 a JexlContext.
      Throws:
      Exception - An exception can be thrown if there is a problem parsing the script.
    • createScript

      @Deprecated public static Script createScript(File scriptFile) throws Exception
      Deprecated.
      Create a JexlEngine and use the createScript method on that instead.
      Creates a Script from a File containing valid JEXL syntax. This method parses the script and validates the syntax.
      Parameters:
      scriptFile - A File containing valid JEXL syntax. Must not be null. Must be a readable file.
      Returns:
      A Script which can be executed with a JexlContext.
      Throws:
      Exception - An exception can be thrown if there is a problem parsing the script.
    • createScript

      @Deprecated public static Script createScript(URL scriptUrl) throws Exception
      Deprecated.
      Create a JexlEngine and use the createScript method on that instead.
      Creates a Script from a URL containing valid JEXL syntax. This method parses the script and validates the syntax.
      Parameters:
      scriptUrl - A URL containing valid JEXL syntax. Must not be null. Must be a readable file.
      Returns:
      A Script which can be executed with a JexlContext.
      Throws:
      Exception - An exception can be thrown if there is a problem parsing the script.
    • createExpression

      @Deprecated public static Expression createExpression(String expression)
      Deprecated.
      Create a JexlEngine and use createExpression() on that
      Creates 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.