Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.ConstantPoolGen.addInterfaceMethodref()


  }

  if (ilKey != null) body.insert(ilKey);

  // Append first code in applyTemplates() - get type of current node
  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));
View Full Code Here


  }

  if (ilKey != null) body.insert(ilKey);

  // Append first code in applyTemplates() - get type of current node
  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));
View Full Code Here

  // Create new instance of DOM class (with RTF_INITIAL_SIZE nodes)
  //int index = cpg.addMethodref(DOM_IMPL, "<init>", "(I)V");
  //il.append(new NEW(cpg.addClass(DOM_IMPL)));
 
  il.append(methodGen.loadDOM());
  int index = cpg.addInterfaceMethodref(DOM_INTF,
         "getResultTreeFrag",
         "(IIZ)" + DOM_INTF_SIG);
  il.append(new PUSH(cpg, RTF_INITIAL_SIZE));
  il.append(new PUSH(cpg, rtfType));
  il.append(new PUSH(cpg, stylesheet.callsNodeset()));
View Full Code Here

  il.append(new INVOKEINTERFACE(index,4));
 
  il.append(DUP);

  // Overwrite old handler with DOM handler
  index = cpg.addInterfaceMethodref(DOM_INTF,
         "getOutputDomBuilder",
         "()" + TRANSLET_OUTPUT_SIG);

  il.append(new INVOKEINTERFACE(index,1));
  il.append(DUP);
View Full Code Here

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();

  // context node is on the stack
  int gname = cpg.addInterfaceMethodref(DOM_INTF,
                "getNodeName",
                "(I)Ljava/lang/String;");
  int cmp = cpg.addMethodref(STRING_CLASS,
           "equals", "(Ljava/lang/Object;)Z");
View Full Code Here

  il.append(methodGen.storeCurrentNode());

  // If pattern not reduced then check kernel
  if (!_typeChecked) {
      il.append(methodGen.loadCurrentNode());
      final int getType = cpg.addInterfaceMethodref(DOM_INTF,
                "getType", "(I)I");
      il.append(methodGen.loadDOM());
      il.append(methodGen.loadCurrentNode());
      il.append(new INVOKEINTERFACE(getType, 2));
      il.append(new PUSH(cpg, DOM.PROCESSING_INSTRUCTION));
View Full Code Here

  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  final Type tselect = _select.getType();

  final String CPY1_SIG = "("+NODE_ITERATOR_SIG+TRANSLET_OUTPUT_SIG+")V";
  final int cpy1 = cpg.addInterfaceMethodref(DOM_INTF, "copy", CPY1_SIG);

  final String CPY2_SIG = "("+NODE_SIG+TRANSLET_OUTPUT_SIG+")V";
  final int cpy2 = cpg.addInterfaceMethodref(DOM_INTF, "copy", CPY2_SIG);

  if (tselect instanceof NodeSetType) {
View Full Code Here

  final String CPY1_SIG = "("+NODE_ITERATOR_SIG+TRANSLET_OUTPUT_SIG+")V";
  final int cpy1 = cpg.addInterfaceMethodref(DOM_INTF, "copy", CPY1_SIG);

  final String CPY2_SIG = "("+NODE_SIG+TRANSLET_OUTPUT_SIG+")V";
  final int cpy2 = cpg.addInterfaceMethodref(DOM_INTF, "copy", CPY2_SIG);

  if (tselect instanceof NodeSetType) {
      il.append(methodGen.loadDOM());

      // push NodeIterator
View Full Code Here

  else if (methodGen instanceof TestGenerator) {
      il.append(new ILOAD(LAST_INDEX));
  }
  else {
      final ConstantPoolGen cpg = classGen.getConstantPool();
      final int getLast = cpg.addInterfaceMethodref(NODE_ITERATOR,
                "getLast",
                "()I");
      il.append(methodGen.loadIterator());
      il.append(new INVOKEINTERFACE(getLast, 1));
  }
View Full Code Here

  for (int i = 0; i<rules.size(); i++) {
      // Get the next rule in the prioritised list
      WhitespaceRule rule = (WhitespaceRule)rules.elementAt(i);

      // Returns the namespace for a node in the DOM
      final int gns = cpg.addInterfaceMethodref(DOM_INTF,
                  "getNamespaceName",
                  "(I)Ljava/lang/String;");

      final int strcmp = cpg.addMethodref("java/lang/String",
            "compareTo",
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.