|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.jexl3.parser.ParserVisitor
org.apache.commons.jexl3.internal.InterpreterBase
public abstract class InterpreterBase
The helper base of an interpreter of JEXL syntax.
Field Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
protected |
InterpreterBase(Engine engine,
JexlContext aContext)
Creates an interpreter base. |
protected |
InterpreterBase(InterpreterBase ii,
JexlArithmetic jexla)
Copy constructor. |
Method Summary | |
---|---|
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 cancelled 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. |
Methods inherited from class org.apache.commons.jexl3.parser.ParserVisitor |
---|
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, visit |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected 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
Constructor Detail |
---|
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)Method Detail |
---|
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 argument
protected 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 null
protected Object unsolvableMethod(JexlNode node, String method)
node
- the node where the error originated frommethod
- the method name
protected Object unsolvableProperty(JexlNode node, String var, Throwable cause)
node
- the node where the error originated fromvar
- the property namecause
- the cause if any
protected 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 cause
protected boolean cancel()
protected boolean isCancelled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |