public abstract class InterpreterBase extends ParserVisitor
| Modifier and Type | Field and Description |
|---|---|
protected JexlArithmetic |
arithmetic
The arithmetic handler.
|
protected static Class<?> |
AUTOCLOSEABLE
Java7 AutoCloseable interface defined?.
|
protected boolean |
cancelled
Cancellation support.
|
protected JexlContext |
context
The context to store/retrieve variables.
|
protected static Object[] |
EMPTY_PARAMS
Empty parameters for method matching.
|
protected Engine |
jexl
The JEXL engine.
|
protected org.apache.commons.logging.Log |
logger
The logger.
|
protected JexlUberspect |
uberspect
The uberspect.
|
| Modifier | Constructor and Description |
|---|---|
protected |
InterpreterBase(Engine engine,
JexlContext aContext)
Creates an interpreter base.
|
protected |
InterpreterBase(InterpreterBase ii,
JexlArithmetic jexla)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected Object |
annotationError(JexlNode node,
String annotation,
Throwable cause)
Triggered when an annotation processing fails.
|
protected boolean |
cancel()
Cancels this evaluation, setting the cancel flag that will result in a JexlException.Cancel to be thrown.
|
protected void |
closeIfSupported(Object closeable)
Attempt to call close() if supported.
|
protected JexlNode |
findNullOperand(RuntimeException xrt,
JexlNode node,
Object left,
Object right)
Finds the node causing a NPE for diadic operators.
|
protected JexlException |
invocationException(JexlNode node,
String methodName,
Exception xany)
Triggered when method, function or constructor invocation fails with an exception.
|
protected boolean |
isCancellable() |
protected boolean |
isCancelled()
Checks whether this interpreter execution was canceled due to thread interruption.
|
protected boolean |
isSilent()
Whether this interpreter is currently evaluating with a silent mode.
|
protected boolean |
isStrictEngine()
Whether this interpreter is currently evaluating with a strict engine flag.
|
protected Object |
operatorError(JexlNode node,
JexlOperator operator,
Throwable cause)
Triggered when an operator fails.
|
protected Object |
unsolvableMethod(JexlNode node,
String method)
Triggered when a method can not be resolved.
|
protected Object |
unsolvableProperty(JexlNode node,
String var,
Throwable cause)
Triggered when a property can not be resolved.
|
protected Object |
unsolvableVariable(JexlNode node,
String var,
boolean undef)
Triggered when a variable can not be resolved.
|
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitprotected final Engine jexl
protected final org.apache.commons.logging.Log logger
protected final JexlUberspect uberspect
protected final JexlArithmetic arithmetic
protected final JexlContext context
protected volatile boolean cancelled
protected static final Object[] EMPTY_PARAMS
protected static final Class<?> AUTOCLOSEABLE
protected InterpreterBase(Engine engine, JexlContext aContext)
engine - the engine creating this interpreteraContext - the context to evaluate expressionprotected InterpreterBase(InterpreterBase ii, JexlArithmetic jexla)
ii - the base to copyjexla - the arithmetic instance to use (or null)protected void closeIfSupported(Object closeable)
This is used when dealing with auto-closeable (duck-like) objects
closeable - the object we'd like to closeprotected boolean isStrictEngine()
protected boolean isSilent()
protected boolean isCancellable()
protected JexlNode findNullOperand(RuntimeException xrt, JexlNode node, Object left, Object right)
xrt - the RuntimeExceptionnode - the parent nodeleft - the left argumentright - the right argumentprotected Object unsolvableVariable(JexlNode node, String var, boolean undef)
node - the node where the error originated fromvar - the variable nameundef - whether the variable is undefined or nullprotected Object unsolvableMethod(JexlNode node, String method)
node - the node where the error originated frommethod - the method nameprotected Object unsolvableProperty(JexlNode node, String var, Throwable cause)
node - the node where the error originated fromvar - the property namecause - the cause if anyprotected Object operatorError(JexlNode node, JexlOperator operator, Throwable cause)
node - the node where the error originated fromoperator - the method namecause - the cause of error (if any)protected Object annotationError(JexlNode node, String annotation, Throwable cause)
node - the node where the error originated fromannotation - the annotation namecause - the cause of error (if any)protected JexlException invocationException(JexlNode node, String methodName, Exception xany)
node - the node triggering the exceptionmethodName - the method/function namexany - the causeprotected boolean cancel()
protected boolean isCancelled()
Copyright © 2001–2016 The Apache Software Foundation. All rights reserved.