⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jaxenhandler.java

📁 XML的解析、编译、查询等技术的JAVA源代码。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    }    public void endAllNodeStep()    {        endStep();    }    public void startProcessingInstructionNodeStep(int axis,                                                   String name) throws JaxenException    {        pushFrame();        push( getXPathFactory().createProcessingInstructionNodeStep( axis,                                                                    name ) );    }        public void endProcessingInstructionNodeStep()    {        endStep();    }    protected void endStep()    {        Step step = (Step) peekFrame().removeFirst();        addPredicates( step,                       popFrame().iterator() );        push( step );    }        public void startPredicate()    {        pushFrame();    }        public void endPredicate() throws JaxenException    {        Predicate predicate = getXPathFactory().createPredicate( (Expr) pop() );        popFrame();        push( predicate );    }    public void startFilterExpr()     {        pushFrame();    }    public void endFilterExpr() throws JaxenException    {        Expr expr = (Expr) peekFrame().removeFirst();                FilterExpr filter = getXPathFactory().createFilterExpr( expr );        Iterator predIter = popFrame().iterator();        addPredicates( filter,                       predIter );        push( filter );    }    protected void addPredicates(Predicated obj,                               Iterator predIter)    {        while ( predIter.hasNext() )        {            obj.addPredicate( (Predicate) predIter.next() );        }    }    protected void returnExpr()    {        Expr expr = (Expr) pop();        popFrame();        push( expr );    }    public void startOrExpr()    {    }    public void endOrExpr(boolean create) throws JaxenException    {        if ( create )        {            Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();            push( getXPathFactory().createOrExpr( lhs,                                                 rhs ) );        }    }    public void startAndExpr()    {    }    public void endAndExpr(boolean create) throws JaxenException    {        if ( create )        {            Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();            push( getXPathFactory().createAndExpr( lhs,                                                  rhs ) );        }    }    public void startEqualityExpr()    {    }    public void endEqualityExpr(int operator) throws JaxenException    {        if ( operator != Operator.NO_OP )        {                        Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();                        push( getXPathFactory().createEqualityExpr( lhs,                                                        rhs,                                                        operator ) );        }    }    public void startRelationalExpr()    {    }    public void endRelationalExpr(int operator) throws JaxenException    {        if ( operator != Operator.NO_OP )        {            Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();            push( getXPathFactory().createRelationalExpr( lhs,                                                         rhs,                                                         operator ) );        }    }    public void startAdditiveExpr()    {    }    public void endAdditiveExpr(int operator) throws JaxenException    {        if ( operator != Operator.NO_OP )        {                        Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();                        push( getXPathFactory().createAdditiveExpr( lhs,                                                        rhs,                                                        operator ) );        }    }    public void startMultiplicativeExpr()    {    }    public void endMultiplicativeExpr(int operator) throws JaxenException    {        if ( operator != Operator.NO_OP )        {            Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();                        push( getXPathFactory().createMultiplicativeExpr( lhs,                                                             rhs,                                                             operator ) );        }    }    public void startUnaryExpr()    {     }    public void endUnaryExpr(int operator) throws JaxenException    {        if ( operator != Operator.NO_OP )        {            push( getXPathFactory().createUnaryExpr( (Expr) pop(),                                                    operator ) );        }    }    public void startUnionExpr()     {    }    public void endUnionExpr(boolean create) throws JaxenException    {        if ( create )        {            Expr rhs = (Expr) pop();            Expr lhs = (Expr) pop();            push( getXPathFactory().createUnionExpr( lhs,                                                    rhs ) );        }    }    public void number(int number) throws JaxenException    {        push( getXPathFactory().createNumberExpr( number ) );    }    public void number(double number) throws JaxenException    {        push( getXPathFactory().createNumberExpr( number ) );    }    public void literal(String literal) throws JaxenException    {        push( getXPathFactory().createLiteralExpr( literal ) );    }    public void variableReference(String prefix,                                  String variableName) throws JaxenException    {        push( getXPathFactory().createVariableReferenceExpr( prefix,                                                             variableName ) );    }    public void startFunction(String prefix,                              String functionName) throws JaxenException    {        pushFrame();        push( getXPathFactory().createFunctionCallExpr( prefix,                                                        functionName ) );    }    public void endFunction()    {        FunctionCallExpr function = (FunctionCallExpr) peekFrame().removeFirst();        addParameters( function,                       popFrame().iterator() );        push( function );    }    protected void addParameters(FunctionCallExpr function,                               Iterator paramIter)    {        while ( paramIter.hasNext() )        {            function.addParameter( (Expr) paramIter.next() );        }    }    protected int stackSize()    {        return peekFrame().size();    }    protected void push(Object obj)    {        peekFrame().addLast( obj );    }    protected Object pop()    {        return peekFrame().removeLast();    }    protected boolean canPop()    {        return ( peekFrame().size() > 0 );    }    protected void pushFrame()    {        this.stack.addLast( new LinkedList() );    }    protected LinkedList popFrame()    {        return (LinkedList) this.stack.removeLast();    }    protected LinkedList peekFrame()    {        return (LinkedList) this.stack.getLast();    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -