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

Examples of com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE


              ORDER_ITERATOR,
              ORDER_ITERATOR_SIG);
      il.append(methodGen.loadDOM());
      il.append(SWAP);
      il.append(methodGen.loadContextNode());
      il.append(new INVOKEINTERFACE(order, 3));

  }
    }
View Full Code Here


 
  final int startElement =
      cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
              "startElement",
              START_ELEMENT_SIG);
  _startElement = new INVOKEINTERFACE(startElement, 2);
 
  final int endElement =
      cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
              "endElement",
              END_ELEMENT_SIG);
  _endElement = new INVOKEINTERFACE(endElement, 2);

  final int attribute =
      cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
              "addAttribute",
              "("
              + STRING_SIG
              + STRING_SIG
              + ")V");
  _attribute = new INVOKEINTERFACE(attribute, 3);

  final int uniqueAttribute =
      cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
              "addUniqueAttribute",
              "("
              + STRING_SIG
              + STRING_SIG
              + "I)V");
  _uniqueAttribute = new INVOKEINTERFACE(uniqueAttribute, 4);

  final int namespace =
      cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
              "namespaceAfterStartElement",
              "("
              + STRING_SIG
              + STRING_SIG
              + ")V");
  _namespace = new INVOKEINTERFACE(namespace, 3);
 
  int index = cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                "startDocument",
                "()V");
  _startDocument = new INVOKEINTERFACE(index, 1);
 
  index = cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
            "endDocument",
            "()V");
  _endDocument = new INVOKEINTERFACE(index, 1);
 
 
  index = cpg.addInterfaceMethodref(NODE_ITERATOR,
            SET_START_NODE,
            SET_START_NODE_SIG);
  _setStartNode = new INVOKEINTERFACE(index, 2);

  index = cpg.addInterfaceMethodref(NODE_ITERATOR,
            "reset", "()"+NODE_ITERATOR_SIG);
  _reset = new INVOKEINTERFACE(index, 1);
 
  index = cpg.addInterfaceMethodref(NODE_ITERATOR, NEXT, NEXT_SIG);
  _nextNode = new INVOKEINTERFACE(index, 1);
 
  _slotAllocator = new SlotAllocator();
  _slotAllocator.initialize(getLocalVariables());
  _allocatorInit = true;
    }
View Full Code Here

        // Turn off character escaping if so is wanted.
        if (!_escaping) {
            il.append(methodGen.loadHandler());
            il.append(new PUSH(cpg,false));
            il.append(new INVOKEINTERFACE(setEscaping,2));
        }

        // Translate the contents.  If the value is a string, use the
        // translet.characters(String, TranslatOutputHandler) method.
        // Otherwise, the value is a node, and the
        // dom.characters(int node, TransletOutputHandler) method can dispatch
        // the string value of the node to the output handler more efficiently.
        if (_isString) {
            final int characters = cpg.addMethodref(TRANSLET_CLASS,
                                                    CHARACTERSW,
                                                    CHARACTERSW_SIG);

            il.append(classGen.loadTranslet());
            _select.translate(classGen, methodGen);
            il.append(methodGen.loadHandler());
            il.append(new INVOKEVIRTUAL(characters));
        } else {
            final int characters = cpg.addInterfaceMethodref(DOM_INTF,
                                                             CHARACTERS,
                                                             CHARACTERS_SIG);

            il.append(methodGen.loadDOM());
            _select.translate(classGen, methodGen);
            il.append(methodGen.loadHandler());
            il.append(new INVOKEINTERFACE(characters, 3));
        }

        // Restore character escaping setting to whatever it was.
        if (!_escaping) {
            il.append(methodGen.loadHandler());
            il.append(SWAP);
            il.append(new INVOKEINTERFACE(setEscaping,2));
            il.append(POP);
        }
    }
View Full Code Here

    int setStartNode = cpg.addInterfaceMethodref(NODE_ITERATOR,
                   SET_START_NODE,
                   "(I)"+
                   NODE_ITERATOR_SIG);
    il.append(methodGen.loadCurrentNode());
    il.append(new INVOKEINTERFACE(setStartNode,2));
    setStartNodeCalled = true
      }
      else {
    if (_select == null)
        Mode.compileGetChildren(classGen, methodGen, current);
View Full Code Here

              ORDER_ITERATOR,
              ORDER_ITERATOR_SIG);
      il.append(methodGen.loadDOM());
      il.append(SWAP);
      il.append(methodGen.loadContextNode());
      il.append(new INVOKEINTERFACE(order, 3));
  }
    }
View Full Code Here

  // call "processingInstruction"
  final int processingInstruction =
      cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
              "processingInstruction",
              "(" + STRING_SIG + STRING_SIG + ")V");
  il.append(new INVOKEINTERFACE(processingInstruction, 3));
  // Restore old handler base from stack
  il.append(methodGen.storeHandler());
    }
View Full Code Here

            _select.translate(classGen, methodGen);
            _select.startIterator(classGen, methodGen);

            // call copy from the DOM 'library'
            il.append(methodGen.loadHandler());
            il.append(new INVOKEINTERFACE(cpy1, 3));
        }
        else if (tselect instanceof NodeType) {
            il.append(methodGen.loadDOM());
            _select.translate(classGen, methodGen);
            il.append(methodGen.loadHandler());
            il.append(new INVOKEINTERFACE(cpy2, 3));
        }
        else if (tselect instanceof ResultTreeType) {
            _select.translate(classGen, methodGen);
            // We want the whole tree, so we start with the root node
            il.append(DUP); //need a pointer to the DOM ;
            il.append(new INVOKEINTERFACE(getDoc,1)); //ICONST_0);
            il.append(methodGen.loadHandler());
            il.append(new INVOKEINTERFACE(cpy2, 3));
        }
        else if (tselect instanceof ReferenceType) {
            _select.translate(classGen, methodGen);
            il.append(methodGen.loadHandler());
            il.append(methodGen.loadCurrentNode());
View Full Code Here

            // The method cloneIterator() also does resetting
            final int clone = cpg.addInterfaceMethodref(NODE_ITERATOR,
                                                       "cloneIterator",
                                                       "()" +
                                                        NODE_ITERATOR_SIG);
            il.append(new INVOKEINTERFACE(clone, 1));
        }
    }
View Full Code Here

                                                        ORDER_ITERATOR,
                                                        ORDER_ITERATOR_SIG);
            il.append(methodGen.loadDOM());
            il.append(SWAP);
            il.append(methodGen.loadContextNode());
            il.append(new INVOKEINTERFACE(order, 3));
        }
    }
View Full Code Here

            final int getType = cpg.addInterfaceMethodref(DOM_INTF,
                                                          "getExpandedTypeID",
                                                          "(I)I");
            il.append(methodGen.loadDOM());
            il.append(methodGen.loadCurrentNode());
            il.append(new INVOKEINTERFACE(getType, 2));
            il.append(new PUSH(cpg, DTM.PROCESSING_INSTRUCTION_NODE));
            _falseList.add(il.append(new IF_ICMPEQ(null)));
        }

        // Load the requested processing instruction name
        il.append(new PUSH(cpg, _name));
        // Load the current processing instruction's name
        il.append(methodGen.loadDOM());
        il.append(methodGen.loadCurrentNode());
        il.append(new INVOKEINTERFACE(gname, 2));
        // Compare the two strings
        il.append(new INVOKEVIRTUAL(cmp));
        _falseList.add(il.append(new IFEQ(null)));

        // Compile the expressions within the predicates
View Full Code Here

TOP

Related Classes of com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE

Copyright © 2018 www.massapicom. 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.