org.objectweb.medor.filter.postfix

Class PostfixExpressionHelper

Implemented Interfaces:
ExpressionHelper

public class PostfixExpressionHelper
extends java.lang.Object
implements ExpressionHelper

An implmentation of the ExpressionHeleper Interface

Method Summary

Operand
evaluate(Expression[] stack, ParameterOperand[] parameters, Tuple t)
void
fixIndexes(QueryNode node, Expression e)
int
getNumberOfNode(Expression e)
String[]
getParameterNames(Expression e)
Expression
join(Expression[] stack)
Expression
substituteParameters(ParameterOperand[] pos, Expression e)
Expression[]
substituteParameters(ParameterOperand[] pos, Expression[] stack)
Expression[]
toStack(Expression e)
ArrayList
toStack(Expression e, ArrayList al)
boolean
verifyNoNull(Expression e)
Checks no branch of the expression is null.

Method Details

evaluate

public Operand evaluate(Expression[] stack,
                        ParameterOperand[] parameters,
                        Tuple t)
            throws MedorException,
                   ExpressionException,
                   IllegalStateException
Specified by:
evaluate in interface ExpressionHelper


fixIndexes

public void fixIndexes(QueryNode node,
                       Expression e)
Specified by:
fixIndexes in interface ExpressionHelper


getNumberOfNode

public int getNumberOfNode(Expression e)
            throws ExpressionException


getParameterNames

public String[] getParameterNames(Expression e)
            throws ExpressionException,
                   TypingException
Specified by:
getParameterNames in interface ExpressionHelper


join

public Expression join(Expression[] stack)
            throws ExpressionException,
                   TypingException
Specified by:
join in interface ExpressionHelper


substituteParameters

public Expression substituteParameters(ParameterOperand[] pos,
                                       Expression e)
            throws ExpressionException,
                   TypingException
Specified by:
substituteParameters in interface ExpressionHelper


substituteParameters

public Expression[] substituteParameters(ParameterOperand[] pos,
                                         Expression[] stack)
            throws ExpressionException,
                   TypingException
Specified by:
substituteParameters in interface ExpressionHelper


toStack

public Expression[] toStack(Expression e)
            throws ExpressionException,
                   TypingException
Specified by:
toStack in interface ExpressionHelper


toStack

public ArrayList toStack(Expression e,
                         ArrayList al)
            throws ExpressionException,
                   TypingException


verifyNoNull

public boolean verifyNoNull(Expression e)
Checks no branch of the expression is null.