public class Interpreter extends Object
Expression in context of given Namespace.| Modifier and Type | Field and Description |
|---|---|
static String |
EXPRESSION_EXCEPTION_CONTEXT
Exception context used when an error happens.
|
| Constructor and Description |
|---|
Interpreter(Namespace namespace,
ExpressionOrigin origin)
Creates new instance of
Interpreter. |
Interpreter(Namespace namespace,
InterpreterConfiguration configuration,
ExpressionOrigin origin)
Creates new instance of
Interpreter. |
| Modifier and Type | Method and Description |
|---|---|
FreeTypeMapping |
currentMapping()
Returns the
FreeTypeMapping for current namespace. |
InterpreterConfiguration |
getConfiguration()
Returns the interpreter configuration.
|
Namespace |
getNamespace()
Returns the current namespace.
|
ExpressionOrigin |
getOrigin()
Returns the expression origin.
|
Object |
interpret(Expression expression)
Interprets a given expression.
|
Object |
interpret(Expression expression,
InterpreterStackTrace stackTrace)
Interprets a given expression.
|
public static final String EXPRESSION_EXCEPTION_CONTEXT
public Interpreter(Namespace namespace, InterpreterConfiguration configuration, ExpressionOrigin origin)
Interpreter.namespace - the namespace where the expressions are interpretedconfiguration - configuration for interpreterorigin - the expression originpublic Interpreter(Namespace namespace, ExpressionOrigin origin)
Interpreter.namespace - origin - the expression originpublic final Object interpret(Expression expression) throws ErrorException
expression - ErrorException - if any exception is thrown during interpretationNullPointerException - if expression is nullpublic Object interpret(Expression expression, InterpreterStackTrace stackTrace) throws ErrorException
expression - stackTrace - interpreter stack traceErrorException - if any exception is thrown during interpretationNullPointerException - if expression is nullpublic Namespace getNamespace()
public FreeTypeMapping currentMapping()
FreeTypeMapping for current namespace.FreeTypeMapping for current namespacepublic InterpreterConfiguration getConfiguration()
public ExpressionOrigin getOrigin()
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.