Java Code Examples for com.sun.org.apache.xpath.internal.Expression#exprSetParent()
The following examples show how to use
com.sun.org.apache.xpath.internal.Expression#exprSetParent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UnionPathIterator.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { if(!(exp instanceof LocPathIterator)) { // Yuck. Need FilterExprIter. Or make it so m_exprs can be just // plain expressions? WalkingIterator wi = new WalkingIterator(getPrefixResolver()); FilterExprWalker few = new FilterExprWalker(wi); wi.setFirstWalker(few); few.setInnerExpression(exp); wi.exprSetParent(UnionPathIterator.this); few.exprSetParent(wi); exp.exprSetParent(few); exp = wi; } else exp.exprSetParent(UnionPathIterator.this); m_exprs[m_index] = (LocPathIterator)exp; }
Example 2
Source File: FunctionOneArg.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Set an argument expression for a function. This method is called by the * XPath compiler. * * @param arg non-null expression that represents the argument. * @param argNum The argument number index. * * @throws WrongNumberArgsException If the argNum parameter is greater than 0. */ public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { if (0 == argNum) { m_arg0 = arg; arg.exprSetParent(this); } else reportWrongNumberArgs(); }
Example 3
Source File: Function3Args.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
/** * Set an argument expression for a function. This method is called by the * XPath compiler. * * @param arg non-null expression that represents the argument. * @param argNum The argument number index. * * @throws WrongNumberArgsException If the argNum parameter is greater than 2. */ public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { if (argNum < 2) super.setArg(arg, argNum); else if (2 == argNum) { m_arg2 = arg; arg.exprSetParent(this); } else reportWrongNumberArgs(); }
Example 4
Source File: FunctionMultiArgs.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
/** * Set an argument expression for a function. This method is called by the * XPath compiler. * * @param arg non-null expression that represents the argument. * @param argNum The argument number index. * * @throws WrongNumberArgsException If a derived class determines that the * number of arguments is incorrect. */ public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { if (argNum < 3) super.setArg(arg, argNum); else { if (null == m_args) { m_args = new Expression[1]; m_args[0] = arg; } else { // Slow but space conservative. Expression[] args = new Expression[m_args.length + 1]; System.arraycopy(m_args, 0, args, 0, m_args.length); args[m_args.length] = arg; m_args = args; } arg.exprSetParent(this); } }
Example 5
Source File: FuncExtFunction.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
/** * Set the parent node. * For an extension function, we also need to set the parent * node for all argument expressions. * * @param n The parent node */ public void exprSetParent(ExpressionNode n) { super.exprSetParent(n); int nArgs = m_argVec.size(); for (int i = 0; i < nArgs; i++) { Expression arg = (Expression) m_argVec.elementAt(i); arg.exprSetParent(n); } }
Example 6
Source File: FunctionMultiArgs.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
/** * Set an argument expression for a function. This method is called by the * XPath compiler. * * @param arg non-null expression that represents the argument. * @param argNum The argument number index. * * @throws WrongNumberArgsException If a derived class determines that the * number of arguments is incorrect. */ public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { if (argNum < 3) super.setArg(arg, argNum); else { if (null == m_args) { m_args = new Expression[1]; m_args[0] = arg; } else { // Slow but space conservative. Expression[] args = new Expression[m_args.length + 1]; System.arraycopy(m_args, 0, args, 0, m_args.length); args[m_args.length] = arg; m_args = args; } arg.exprSetParent(this); } }
Example 7
Source File: Function3Args.java From JDKSourceCode1.8 with MIT License | 5 votes |
/** * Set an argument expression for a function. This method is called by the * XPath compiler. * * @param arg non-null expression that represents the argument. * @param argNum The argument number index. * * @throws WrongNumberArgsException If the argNum parameter is greater than 2. */ public void setArg(Expression arg, int argNum) throws WrongNumberArgsException { if (argNum < 2) super.setArg(arg, argNum); else if (2 == argNum) { m_arg2 = arg; arg.exprSetParent(this); } else reportWrongNumberArgs(); }
Example 8
Source File: FilterExprIteratorSimple.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * Set the inner contained expression of this filter. */ public void setInnerExpression(Expression expr) { expr.exprSetParent(this); m_expr = expr; }
Example 9
Source File: PredicatedNodeTest.java From hottub with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(PredicatedNodeTest.this); m_predicates[m_index] = exp; }
Example 10
Source File: AxesWalker.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(this); m_nextWalker = (AxesWalker)exp; }
Example 11
Source File: UnionPattern.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(UnionPattern.this); m_patterns[m_index] = (StepPattern)exp; }
Example 12
Source File: FunctionOneArg.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(this); m_arg0 = exp; }
Example 13
Source File: Operation.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(Operation.this); m_left = exp; }
Example 14
Source File: FilterExprIteratorSimple.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(FilterExprIteratorSimple.this); m_expr = exp; }
Example 15
Source File: PredicatedNodeTest.java From JDKSourceCode1.8 with MIT License | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(PredicatedNodeTest.this); m_predicates[m_index] = exp; }
Example 16
Source File: Function3Args.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(Function3Args.this); m_arg2 = exp; }
Example 17
Source File: FilterExprWalker.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * Set the inner contained expression of this filter. */ public void setInnerExpression(Expression expr) { expr.exprSetParent(this); m_expr = expr; }
Example 18
Source File: FunctionOneArg.java From jdk8u60 with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(this); m_arg0 = exp; }
Example 19
Source File: StepPattern.java From Bytecoder with Apache License 2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(StepPattern.this); m_predicates[m_index] = exp; }
Example 20
Source File: Operation.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
/** * @see ExpressionOwner#setExpression(Expression) */ public void setExpression(Expression exp) { exp.exprSetParent(this); m_right = exp; }