net.esper.eql.core
Class AliasNodeSwapper
java.lang.Object
net.esper.eql.core.AliasNodeSwapper
public class AliasNodeSwapper
- extends Object
A utility class for replacing select-clause aliases with their
definitions in expression node trees.
Method Summary |
static ExprNode |
swap(ExprNode exprTree,
String alias,
ExprNode fullExpr)
Replace all instances of the node representing the alias with
the full expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AliasNodeSwapper
public AliasNodeSwapper()
swap
public static ExprNode swap(ExprNode exprTree,
String alias,
ExprNode fullExpr)
- Replace all instances of the node representing the alias with
the full expression.
- Parameters:
exprTree
- - the expression node tree to make the changes inalias
- - the select-clause alias that is to be expandedfullExpr
- - the full expression that the alias represents
- Returns:
- exprTree with the appropriate swaps performed, or fullExpr,
if all of exprTree needed to be swapped