| /* Generated By:JJTree: Do not edit this line. ExprSequence.java */ | |
| package org.apache.xpath.seqctor; | |
| import java.util.Vector; | |
| import javax.xml.transform.TransformerException; | |
| import org.apache.xpath.Expression; | |
| import org.apache.xpath.ExpressionOwner; | |
| import org.apache.xpath.VariableComposeState; | |
| import org.apache.xpath.XPathContext; | |
| import org.apache.xpath.XPathVisitor; | |
| import org.apache.xpath.objects.XObject; | |
| import org.apache.xpath.parser.Node; | |
| import org.apache.xpath.parser.Token; | |
| public class ExprSequence extends Expression implements ExpressionOwner | |
| { | |
| Vector m_exprs = new Vector(); | |
| public void jjtAddChild(Node n, int i) | |
| { | |
| n = fixupPrimarys(n); | |
| if(null == m_exprs) | |
| m_exprs = new Vector(); | |
| if(i >= m_exprs.size()) | |
| { | |
| m_exprs.setSize(i+1); | |
| } | |
| m_exprs.setElementAt(n, i); | |
| } | |
| public Node jjtGetChild(int i) | |
| { | |
| if(null == m_exprs) | |
| return null; | |
| else | |
| return (Node)m_exprs.elementAt(i); | |
| } | |
| public int jjtGetNumChildren() | |
| { | |
| if(null == m_exprs) | |
| return 0; | |
| else | |
| return m_exprs.size(); | |
| } | |
| /** | |
| * @see Expression#deepEquals(Expression) | |
| * Dummy stub. | |
| */ | |
| public boolean deepEquals(Expression expr) | |
| { | |
| return false; | |
| } | |
| /** | |
| * @see Expression#fixupVariables(Vector, int) | |
| * Dummy stub. | |
| */ | |
| public void fixupVariables(VariableComposeState vcs) | |
| { | |
| Vector exprs = m_exprs; | |
| int vsize = exprs.size(); | |
| for (int i = 0; i < vsize; i++) | |
| { | |
| Expression val = (Expression)exprs.elementAt(i); | |
| val.fixupVariables(vcs); | |
| } | |
| } | |
| /** | |
| * @see Expression#execute(XPathContext) | |
| * Dummy stub. | |
| */ | |
| public XObject execute(XPathContext xctxt) throws TransformerException | |
| { | |
| return new ExprSequenceIter(m_exprs, xctxt); | |
| } | |
| /** | |
| * @see XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor) | |
| * Dummy stub. | |
| */ | |
| public void callVisitors(ExpressionOwner owner, XPathVisitor visitor) | |
| { | |
| } | |
| /** | |
| * @see ExpressionOwner#getExpression() | |
| */ | |
| public Expression getExpression() | |
| { | |
| return null; | |
| } | |
| /** | |
| * @see ExpressionOwner#setExpression(Expression) | |
| */ | |
| public void setExpression(Expression exp) | |
| { | |
| } | |
| /** | |
| * @see SimpleNode#shouldReduceIfOneChild() | |
| */ | |
| public boolean shouldReduceIfOneChild() | |
| { | |
| return (jjtGetNumChildren() == 1) ? true : false; | |
| } | |
| /** | |
| * @see org.apache.xpath.parser.SimpleNode#isPathExprReduced() | |
| */ | |
| public boolean isPathExprReduced() | |
| { | |
| return (null == m_exprs) ? false : true; | |
| } | |
| } |