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

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


  else {
      final int gitr = cpg.addInterfaceMethodref(DOM_INTF,
                   "getIterator",
                   "()"+NODE_ITERATOR_SIG);
      il.append(methodGen.loadDOM());
      il.append(new INVOKEINTERFACE(gitr, 1));
  }
    }
View Full Code Here


  final int getLocalName = cpg.addMethodref(BASIS_LIBRARY_CLASS,
              "getLocalName",
              "(Ljava/lang/String;)"+
              "Ljava/lang/String;");
  super.translate(classGen, methodGen);
  il.append(new INVOKEINTERFACE(getNodeName, 2));
  il.append(new INVOKESTATIC(getLocalName));
    }
View Full Code Here

  }

  if (classGen.containsMethod(STRIP_SPACE, STRIP_SPACE_PARAMS) != null) {
      il.append(toplevel.loadDOM());
      il.append(classGen.loadTranslet());
      il.append(new INVOKEINTERFACE(setFilter, 2));
  }

  il.append(RETURN);

  // Compute max locals + stack and add method to class
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

      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

 
  if (_methodName == null) {
      int index = cpg.addInterfaceMethodref(DOM_INTF,
              "getStringValue",
              "()"+STRING_SIG);
      il.append(new INVOKEINTERFACE(index, 1));
  }
  else {
      final String className = classGen.getClassName();
      final int current = methodGen.getLocalIndex("current");
     
View Full Code Here

      int index = cpg.addInterfaceMethodref(DOM_INTF,
         "getResultTreeFrag",
         "(IZ)" + DOM_INTF_SIG);
      il.append(new PUSH(cpg, RTF_INITIAL_SIZE));
      il.append(new PUSH(cpg, false));
      il.append(new INVOKEINTERFACE(index,3));
      il.append(DUP);
     
      // Store new DOM into a local variable
      newDom = methodGen.addLocalVariable("rt_to_reference_dom",
            Util.getJCRefType(DOM_INTF_SIG),
            null, null);
      il.append(new CHECKCAST(cpg.addClass(DOM_INTF_SIG)));
      il.append(new ASTORE(newDom.getIndex()));

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

      il.append(new INVOKEINTERFACE(index,1));
      //index = cpg.addMethodref(DOM_IMPL,
    //         "getOutputDomBuilder",
    //         "()" + TRANSLET_OUTPUT_SIG);
      //il.append(new INVOKEVIRTUAL(index));
      il.append(DUP);
      il.append(DUP);

      // Store DOM handler in a local in order to call endDocument()
      domBuilder =
    methodGen.addLocalVariable("rt_to_reference_handler",
             Util.getJCRefType(TRANSLET_OUTPUT_SIG),
             null, null);
      il.append(new ASTORE(domBuilder.getIndex()));

      // Call startDocument on the new handler
      index = cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                "startDocument", "()V");
      il.append(new INVOKEINTERFACE(index, 1));

      // Call the method that implements this result tree
      index = cpg.addMethodref(className,
             _methodName,
             "("
             + DOM_INTF_SIG
             + TRANSLET_OUTPUT_SIG
             +")V");
      il.append(new INVOKEVIRTUAL(index));

      // Call endDocument on the DOM handler
      il.append(new ALOAD(domBuilder.getIndex()));
      index = cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                "endDocument", "()V");
      il.append(new INVOKEINTERFACE(index, 1));

      // Push the new DOM on the stack
      il.append(new ALOAD(newDom.getIndex()));
  }
    }
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.