Ejemplo n.º 1
0
 /**
  * Creates an interpreter.
  * @param jexl the engine creating this interpreter
  * @param aContext the context to evaluate expression
  * @param strictFlag whether this interpreter runs in strict mode
  * @param silentFlag whether this interpreter runs in silent mode
  * @since 2.1
  */
 public Interpreter(JexlEngine jexl, JexlContext aContext, bool strictFlag, bool silentFlag) {
     this.logger = jexl.logger;
     this.uberspect = jexl.uberspect;
     this.arithmetic = jexl.arithmetic;
     this.functions = jexl.functions;
     this.strict = strictFlag;
     this.silent = silentFlag;
     this.cache = jexl.cache != null;
     this.context = aContext != null ? aContext : JexlEngine.EMPTY_CONTEXT;
     this.functors = null;
 }
Ejemplo n.º 2
0
 public Interpreter(JexlEngine jexl, JexlContext aContext) {
     this(jexl, aContext, !jexl.isLenient(), jexl.isSilent());
 }
Ejemplo n.º 3
0
 /**
  * Sets this interpreter parameters and arguments.
  * @param frame the calling frame
  * @since 2.1
  */
 protected void setFrame(JexlEngine.Frame frame) {
     if (frame != null)
     {
         this.parameters = frame.getParameters();
         this.registers = frame.getRegisters();
     }
     else
     {
         this.parameters = null;
         this.registers = null;
     }
 }