Class Expression

java.lang.Object
com.igormaznitsa.jcp.expression.Expression

public class Expression extends Object
The main class to calculate expressions
Author:
Igor Maznitsa (igor.maznitsa@igormaznitsa.com)
  • Method Details

    • evalExpression

      public static Value evalExpression(String expression, PreprocessorContext context)
      Evaluate expression
      Parameters:
      expression - the expression as a String, must not be null
      context - a preprocessor context to be used for expression operations
      Returns:
      the result as a Value object, it can't be null
    • evalTree

      public static Value evalTree(ExpressionTree tree, PreprocessorContext context)
      Evaluate an expression tree
      Parameters:
      tree - an expression tree, it must not be null
      context - a preprocessor context to be used for expression operations
      Returns:
      the result as a Value object, it can't be null