Class Expression
java.lang.Object
com.igormaznitsa.jcp.expression.Expression
The main class to calculate expressions
- Author:
- Igor Maznitsa (igor.maznitsa@igormaznitsa.com)
-
Method Summary
Modifier and TypeMethodDescriptionstatic ValueevalExpression(String expression, PreprocessorContext context) Evaluate expressionstatic ValueevalTree(ExpressionTree tree, PreprocessorContext context) Evaluate an expression tree
-
Method Details
-
evalExpression
Evaluate expression- Parameters:
expression- the expression as a String, must not be nullcontext- a preprocessor context to be used for expression operations- Returns:
- the result as a Value object, it can't be null
-
evalTree
Evaluate an expression tree- Parameters:
tree- an expression tree, it must not be nullcontext- a preprocessor context to be used for expression operations- Returns:
- the result as a Value object, it can't be null
-