Package org.apache.bcel.generic

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


                // Invoke output.setEncoding("UTF-8")
                il.append(methodGen.loadHandler());
                il.append(new PUSH(cpg, "UTF-8"));   // other encodings?
                il.append(new INVOKEINTERFACE(
                    cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                                              "setEncoding",
                                              "("+STRING_SIG+")V"), 2));

                // Invoke output.setOmitXMLDeclaration(true)
                il.append(methodGen.loadHandler());
View Full Code Here


                // Invoke output.setOmitXMLDeclaration(true)
                il.append(methodGen.loadHandler());
                il.append(ICONST_1);
                il.append(new INVOKEINTERFACE(
                    cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                                              "setOmitXMLDeclaration",
                                              "(Z)V"), 2));

                il.append(methodGen.loadHandler());
                il.append(new INVOKEINTERFACE(
View Full Code Here

                                              "setOmitXMLDeclaration",
                                              "(Z)V"), 2));

                il.append(methodGen.loadHandler());
                il.append(new INVOKEINTERFACE(
                    cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                                              "startDocument",
                                              "()V"), 1));

                // Inline translation of contents
                translateContents(classGen, methodGen);
View Full Code Here

                // Inline translation of contents
                translateContents(classGen, methodGen);

                il.append(methodGen.loadHandler());
                il.append(new INVOKEINTERFACE(
                    cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE,
                                              "endDocument",
                                              "()V"), 1));

                // Call toString() on StringWriter
                il.append(new INVOKEVIRTUAL(
View Full Code Here

      // Initialize Dup Filter Iterator with iterator from the stack
      il.append(new INVOKESPECIAL(initDFI));
  }
  else {
      final int git = cpg.addInterfaceMethodref(DOM_INTF,
                  "getIterator",
                  "()"+NODE_ITERATOR_SIG);
      il.append(methodGen.loadDOM());
      il.append(new INVOKEINTERFACE(git, 1));
  }
View Full Code Here

      }
      buffer.append(')');
      buffer.append(getSignature(_chosenMethod.getReturnType()));

      if (_thisArgument != null && _clazz.isInterface()) {
          index = cpg.addInterfaceMethodref(clazz,
             _fname.getLocalPart(),
             buffer.toString());
    il.append(new INVOKEINTERFACE(index, n+1));
            }
            else {
View Full Code Here

      // Initialize AbsoluteIterator with iterator from the stack
      il.append(new INVOKESPECIAL(initAI));
  }
  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

  switch (_type) {
  case NodeTest.ROOT:
  case NodeTest.ELEMENT:
      il.append(methodGen.loadDOM());
      il.append(SWAP); // dom ref must be below node index
      int index = cpg.addInterfaceMethodref(DOM_INTF,
              GET_ELEMENT_VALUE,
              GET_ELEMENT_VALUE_SIG);
      il.append(new INVOKEINTERFACE(index, 2));
      break;
View Full Code Here

  case NodeTest.COMMENT:
  case NodeTest.ATTRIBUTE:
  case NodeTest.PI:
      il.append(methodGen.loadDOM());
      il.append(SWAP); // dom ref must be below node index
      index = cpg.addInterfaceMethodref(DOM_INTF,
                GET_NODE_VALUE,
                GET_NODE_VALUE_SIG);
      il.append(new INVOKEINTERFACE(index, 2));
      break;
     
View Full Code Here

  il.append(methodGen.loadDOM());
  il.append(SWAP);    // dom ref must be below node index

        if (className.equals("org.w3c.dom.Node") ||
            className.equals("java.lang.Object")) {
      int index = cpg.addInterfaceMethodref(DOM_INTF,
              MAKE_NODE,
              MAKE_NODE_SIG);
      il.append(new INVOKEINTERFACE(index, 2));
  }
  else if (className.equals("org.w3c.dom.NodeList")) {
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.