Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.INVOKEINTERFACE


  // continue with globals initialization
  final int gitr = cpg.addInterfaceMethodref(DOM_INTF,
              "getIterator",
              "()"+NODE_ITERATOR_SIG);
  il.append(transf.loadDOM());
  il.append(new INVOKEINTERFACE(gitr, 1));
        il.append(transf.nextNode());
  current.setStart(il.append(new ISTORE(current.getIndex())));

  // Transfer the output settings to the output post-processor
  il.append(classGen.loadTranslet());
View Full Code Here


  parentNode.setEnd(il.append(new ILOAD(parentNode.getIndex())));

  // Now get the node value and push it on the parameter stack
  il.append(methodGen.loadDOM());
  il.append(methodGen.loadCurrentNode());
  il.append(new INVOKEINTERFACE(getNodeValue, 2));   

  // Finally do the call to add an entry in the index for this key.
  il.append(new INVOKEVIRTUAL(buildKeyIndex));
 
  il.append(classGen.loadTranslet());
View Full Code Here

  il.append(methodGen.loadIterator());

  // Get an iterator for all nodes in the DOM
  il.append(methodGen.loadDOM())
  il.append(new PUSH(cpg,Axis.DESCENDANT));
  il.append(new INVOKEINTERFACE(git, 2));

  // Reset the iterator to start with the root node
  il.append(methodGen.loadCurrentNode());
  il.append(methodGen.setStartNode());
  il.append(methodGen.storeIterator());
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(getLocalVariableRegistry().getLocals(false));
  _allocatorInit = true;
    }
View Full Code Here

  final int git = cpg.addInterfaceMethodref(DOM_INTF,
              GET_CHILDREN,
              GET_CHILDREN_SIG);
  il.append(methodGen.loadDOM());
  il.append(new ILOAD(node));
  il.append(new INVOKEINTERFACE(git, 2));
    }
View Full Code Here

  il.append(classGen.loadTranslet());
  il.append(methodGen.loadDOM());
 
  il.append(methodGen.loadDOM());
  il.append(new ILOAD(_currentIndex));
  il.append(new INVOKEINTERFACE(git, 2));
  il.append(methodGen.loadHandler());
  il.append(new INVOKEVIRTUAL(applyTemplates));
  il.append(new GOTO_W(next));
  return il;
    }
View Full Code Here

                CHARACTERS,
                CHARACTERS_SIG);
  il.append(methodGen.loadDOM());
  il.append(new ILOAD(_currentIndex));
  il.append(methodGen.loadHandler());
  il.append(new INVOKEINTERFACE(chars, 3));
  il.append(new GOTO_W(next));
  return il;
    }
View Full Code Here

      final int getNS = cpg.addInterfaceMethodref(DOM_INTF,
              "getNamespaceType",
              "(I)I");
      il.append(methodGen.loadDOM());
      il.append(new ILOAD(_currentIndex));
      il.append(new INVOKEINTERFACE(getNS, 2));
      il.append(new SWITCH(types, targets, defaultTarget));
      return(il);
  }
  else {
      return(null);
View Full Code Here

  final int getType = cpg.addInterfaceMethodref(DOM_INTF,
                  "getExpandedTypeID",
                                                      "(I)I");
  body.append(methodGen.loadDOM());
  body.append(new ILOAD(_currentIndex));
  body.append(new INVOKEINTERFACE(getType, 2));

  // Append switch() statement - main dispatch loop in applyTemplates()
  InstructionHandle disp = body.append(new SWITCH(types, targets, ihLoop));

  // Append all the "case:" statements
View Full Code Here

  final int getType = cpg.addInterfaceMethodref(DOM_INTF,
                  "getExpandedTypeID",
                                                      "(I)I");
  body.append(methodGen.loadDOM());
  body.append(new ILOAD(_currentIndex));
  body.append(new INVOKEINTERFACE(getType, 2));

  // Append switch() statement - main dispatch loop in applyTemplates()
  InstructionHandle disp = body.append(new SWITCH(types,targets,ihLoop));

  // Append all the "case:" statements
View Full Code Here

TOP

Related Classes of org.apache.bcel.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.