Class ColumnNamedNodeSwapper

java.lang.Object
com.espertech.esper.common.internal.epl.resultset.core.ColumnNamedNodeSwapper

public class ColumnNamedNodeSwapper extends Object
A utility class for replacing select-clause column names with their definitions in expression node trees.
  • Constructor Details

    • ColumnNamedNodeSwapper

      public ColumnNamedNodeSwapper()
  • Method Details

    • swap

      public static ExprNode swap(ExprNode exprTree, String columnName, ExprNode fullExpr)
      Replace all instances of the node representing the colum name with the full expression.
      Parameters:
      exprTree - - the expression node tree to make the changes in
      columnName - - the select-clause name that is to be expanded
      fullExpr - - the full expression that the column name represents
      Returns:
      exprTree with the appropriate swaps performed, or fullExpr, if all of exprTree needed to be swapped