org.objectweb.medor.filter.postfix
Class PostfixExpressionHelper
java.lang.Object
org.objectweb.medor.filter.postfix.PostfixExpressionHelper
- All 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)
For a given Expression used at a QueryNode, sets the index of its
FieldOperands (index in the tuple resulting from the concatenation
of the children QueryNode tuples). |
int |
getNumberOfNode(Expression e)
|
java.lang.String[] |
getParameterNames(Expression e)
|
Expression |
join(Expression[] stack)
|
Expression |
substituteParameters(ParameterOperand[] pos,
Expression e)
|
Expression[] |
toStack(Expression e)
|
java.util.ArrayList |
toStack(Expression e,
java.util.ArrayList al)
|
boolean |
verifyNoNull(Expression e)
Checks no branch of the expression is null. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PostfixExpressionHelper
public PostfixExpressionHelper()
toStack
public Expression[] toStack(Expression e)
throws ExpressionException,
TypingException
- Specified by:
toStack
in interface ExpressionHelper
- Throws:
ExpressionException
TypingException
join
public Expression join(Expression[] stack)
throws ExpressionException,
TypingException
- Specified by:
join
in interface ExpressionHelper
- Throws:
ExpressionException
TypingException
substituteParameters
public Expression substituteParameters(ParameterOperand[] pos,
Expression e)
throws ExpressionException,
TypingException
- Specified by:
substituteParameters
in interface ExpressionHelper
- Throws:
ExpressionException
TypingException
fixIndexes
public void fixIndexes(QueryNode node,
Expression e)
- Description copied from interface:
ExpressionHelper
- For a given Expression used at a QueryNode, sets the index of its
FieldOperands (index in the tuple resulting from the concatenation
of the children QueryNode tuples).
It will call the setIndex method of
FieldOperand.
- Specified by:
fixIndexes
in interface ExpressionHelper
- See Also:
FieldOperand
evaluate
public Operand evaluate(Expression[] stack,
ParameterOperand[] parameters,
Tuple t)
throws MedorException,
ExpressionException,
java.lang.IllegalStateException
- Specified by:
evaluate
in interface ExpressionHelper
- Throws:
MedorException
ExpressionException
java.lang.IllegalStateException
toStack
public java.util.ArrayList toStack(Expression e,
java.util.ArrayList al)
throws ExpressionException,
TypingException
- Throws:
ExpressionException
TypingException
getNumberOfNode
public int getNumberOfNode(Expression e)
throws ExpressionException
- Throws:
ExpressionException
verifyNoNull
public boolean verifyNoNull(Expression e)
- Checks no branch of the expression is null.
getParameterNames
public java.lang.String[] getParameterNames(Expression e)
throws ExpressionException,
TypingException
- Specified by:
getParameterNames
in interface ExpressionHelper
- Throws:
ExpressionException
TypingException