Package com.sun.org.apache.bcel.internal.generic

Examples of com.sun.org.apache.bcel.internal.generic.ConstantPoolGen.addInterfaceMethodref()


                                                      "["+STRING_SIG+")V");
        il.append(new INVOKEINTERFACE(mapping, 5));
        il.append(DUP);

        // Create an iterator for the root node of the DOM adapter
        final int iter = cpg.addInterfaceMethodref(DOM_INTF,
                                                   "getIterator",
                                                   "()"+NODE_ITERATOR_SIG);
        il.append(new INVOKEINTERFACE(iter, 1));
    }
View Full Code Here


        final ConstantPoolGen cpg = classGen.getConstantPool();
        final InstructionList il = methodGen.getInstructionList();

        if (className.equals("org.w3c.dom.Node")) {
            translateTo(classGen, methodGen, Type.NodeSet);
            int index = cpg.addInterfaceMethodref(DOM_INTF,
                                                  MAKE_NODE,
                                                  MAKE_NODE_SIG2);
            il.append(new INVOKEINTERFACE(index, 2));
        }
        else if (className.equals("org.w3c.dom.NodeList")) {
View Full Code Here

                                                  MAKE_NODE_SIG2);
            il.append(new INVOKEINTERFACE(index, 2));
        }
        else if (className.equals("org.w3c.dom.NodeList")) {
            translateTo(classGen, methodGen, Type.NodeSet);
            int index = cpg.addInterfaceMethodref(DOM_INTF,
                                                  MAKE_NODE_LIST,
                                                  MAKE_NODE_LIST_SIG2);
            il.append(new INVOKEINTERFACE(index, 2));
        }
        else if (className.equals("java.lang.Object")) {
View Full Code Here

            // and has no parent
      if (_axis == Axis.ATTRIBUTE && _nodeType != NodeTest.ATTRIBUTE
    && _nodeType != NodeTest.ANODE && !hasParentPattern()
                && star == 0)
      {
    int iter = cpg.addInterfaceMethodref(DOM_INTF,
                 "getTypedAxisIterator",
                 "(II)"+NODE_ITERATOR_SIG);
    il.append(methodGen.loadDOM());
    il.append(new PUSH(cpg, Axis.ATTRIBUTE));
    il.append(new PUSH(cpg, _nodeType));
View Full Code Here

      il.append(DUP);
      il.append(methodGen.loadContextNode());
      il.append(new INVOKESPECIAL(init));
        } else {
      // DOM.getAxisIterator(int axis);
      int git = cpg.addInterfaceMethodref(DOM_INTF,
            "getAxisIterator",
            "(I)"+NODE_ITERATOR_SIG);
      il.append(methodGen.loadDOM());
      il.append(new PUSH(cpg, _axis));
      il.append(new INVOKEINTERFACE(git, 2));
View Full Code Here

      switch (_nodeType) {
      case NodeTest.ATTRIBUTE:
    _axis = Axis.ATTRIBUTE;
      case NodeTest.ANODE:
    // DOM.getAxisIterator(int axis);
    int git = cpg.addInterfaceMethodref(DOM_INTF,
                "getAxisIterator",
                "(I)"+NODE_ITERATOR_SIG);
    il.append(methodGen.loadDOM());
    il.append(new PUSH(cpg, _axis));
    il.append(new INVOKEINTERFACE(git, 2));
View Full Code Here

      namespace = name.substring(0,star-2);
        else
      namespace = name.substring(0,star-1);

        final int nsType = xsltc.registerNamespace(namespace);
        final int ns = cpg.addInterfaceMethodref(DOM_INTF,
                "getNamespaceAxisIterator",
                "(II)"+NODE_ITERATOR_SIG);
        il.append(methodGen.loadDOM());
        il.append(new PUSH(cpg, _axis));
        il.append(new PUSH(cpg, nsType));
View Full Code Here

        il.append(new INVOKEINTERFACE(ns, 3));
        break;
    }
      case NodeTest.ELEMENT:
    // DOM.getTypedAxisIterator(int axis, int type);
    final int ty = cpg.addInterfaceMethodref(DOM_INTF,
            "getTypedAxisIterator",
            "(II)"+NODE_ITERATOR_SIG);
    // Get the typed iterator we're after
    il.append(methodGen.loadDOM());
    il.append(new PUSH(cpg, _axis));
View Full Code Here

        catch (TypeCheckError e) { }
        path.translate(classGen, methodGen);
        il.append(new ICONST(DOM.RETURN_PARENT));
    }
    predicate.translate(classGen, methodGen);
    idx = cpg.addInterfaceMethodref(DOM_INTF,
            GET_NODE_VALUE_ITERATOR,
            GET_NODE_VALUE_ITERATOR_SIG);
    il.append(new INVOKEINTERFACE(idx, 5));
      }           
      // Handle '//*[n]' expression
View Full Code Here

    il.append(methodGen.loadDOM());
    // il.append(new ICONST(NodeTest.ELEMENT));
    il.append(new ICONST(predicate.getPosType()));
    predicate.translate(classGen, methodGen);
    il.append(new ICONST(0));
    idx = cpg.addInterfaceMethodref(DOM_INTF,
            "getNthDescendant",
            "(IIZ)"+NODE_ITERATOR_SIG);
    il.append(new INVOKEINTERFACE(idx, 4));
      }
      // Handle 'elem[n]' expression
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.