com.taggercat.util
Class RhinoUtils

java.lang.Object
  extended by com.taggercat.util.RhinoUtils

public class RhinoUtils
extends java.lang.Object

A set of utility functions to use the Rhino Scripting engine for constraint and derivation expressions, etc..

 

Method Summary
static java.lang.Object evaluateExpression(java.lang.String expression, com.taggercat.el.ELPropertyResolver resolver, com.taggercat.el.ELContext elContext)
           
static java.lang.Object evaluateRhinoScript(com.taggercat.el.ELContext elContext, java.lang.String jsCodeAsString)
           
static boolean isRhinoExpression(java.lang.String expression)
          Returns true If the expression includes a semi-colon at the end of a line, then it is treated as a Rhino JS expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

evaluateRhinoScript

public static java.lang.Object evaluateRhinoScript(com.taggercat.el.ELContext elContext,
                                                   java.lang.String jsCodeAsString)
                                            throws com.taggercat.el.ParseException
Throws:
com.taggercat.el.ParseException

isRhinoExpression

public static boolean isRhinoExpression(java.lang.String expression)
Returns true If the expression includes a semi-colon at the end of a line, then it is treated as a Rhino JS expression.

Parameters:
expression - the expression to check
Returns:
true if this looks like JS code

evaluateExpression

public static java.lang.Object evaluateExpression(java.lang.String expression,
                                                  com.taggercat.el.ELPropertyResolver resolver,
                                                  com.taggercat.el.ELContext elContext)
                                           throws com.taggercat.el.ParseException
Throws:
com.taggercat.el.ParseException