Beispiel #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;
 }
Beispiel #2
0
 /**
  * Copy constructor.
  * @param base the base to copy
  * @since 2.1
  */
 protected Interpreter(Interpreter base) {
     this.logger = base.logger;
     this.uberspect = base.uberspect;
     this.arithmetic = base.arithmetic;
     this.functions = base.functions;
     this.strict = base.strict;
     this.silent = base.silent;
     this.cache = base.cache;
     this.context = base.context;
     this.functors = base.functors;
 }
Beispiel #3
0
 public Interpreter(JexlEngine jexl, JexlContext aContext) {
     this(jexl, aContext, !jexl.isLenient(), jexl.isSilent());
 }