Package org.apache.bcel.generic

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


             +")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


  il.append(classGen.loadTranslet()); // get namespaces array
  il.append(new GETFIELD(cpg.addFieldref(TRANSLET_CLASS,
                 NAMESPACE_INDEX,
                 NAMESPACE_INDEX_SIG)));
  // Pass the type mappings to the DOM adapter
  final int mapping = cpg.addInterfaceMethodref(DOM_INTF,
                  "setupMapping",
                  "(["+STRING_SIG+
                  "["+STRING_SIG+")V");
  il.append(new INVOKEINTERFACE(mapping, 3));
  il.append(DUP);
View Full Code Here

                  "["+STRING_SIG+")V");
  il.append(new INVOKEINTERFACE(mapping, 3));
  il.append(DUP);

  // Create an iterator for the root node of the DOM adapter
  final int iter = cpg.addInterfaceMethodref(DOM_INTF,
               "getIterator",
               "()"+NODE_ITERATOR_SIG);
  il.append(new INVOKEINTERFACE(iter, 1))
    }
View Full Code Here

  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();

  if (className.equals("org.w3c.dom.Node")) {
      translateTo(classGen, methodGen, Type.NodeSet);
      int index = cpg.addInterfaceMethodref(DOM_INTF,
              MAKE_NODE,
              MAKE_NODE_SIG2);
      il.append(new INVOKEINTERFACE(index, 2));
  }
  else if (className.equals("org.w3c.dom.NodeList")) {
View Full Code Here

              MAKE_NODE_SIG2);
      il.append(new INVOKEINTERFACE(index, 2));
  }
  else if (className.equals("org.w3c.dom.NodeList")) {
      translateTo(classGen, methodGen, Type.NodeSet);
      int index = cpg.addInterfaceMethodref(DOM_INTF,
              MAKE_NODE_LIST,
              MAKE_NODE_LIST_SIG2);
      il.append(new INVOKEINTERFACE(index, 2));
  }
  else if (className.equals("java.lang.Object")) {
View Full Code Here

      else {
    _left.translate(classGen, methodGen);
      }
  }

  final int getParent = cpg.addInterfaceMethodref(DOM_INTF,
              GET_PARENT,
              GET_PARENT_SIG);
  final int getType = cpg.addInterfaceMethodref(DOM_INTF,
                  "getType", "(I)I");
View Full Code Here

  }

  final int getParent = cpg.addInterfaceMethodref(DOM_INTF,
              GET_PARENT,
              GET_PARENT_SIG);
  final int getType = cpg.addInterfaceMethodref(DOM_INTF,
                  "getType", "(I)I");

  InstructionHandle begin = il.append(methodGen.loadDOM());
  il.append(SWAP);
  il.append(new INVOKEINTERFACE(getParent, 2));
View Full Code Here

    il.append(SWAP);
      }
  }

  if (_left != null) {
      final int getParent = cpg.addInterfaceMethodref(DOM_INTF,
                  GET_PARENT,
                  GET_PARENT_SIG);
      parent = il.append(new INVOKEINTERFACE(getParent, 2));
     
      il.append(DUP);
View Full Code Here

    }

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  final int setEscaping = cpg.addInterfaceMethodref(OUTPUT_HANDLER,
                "setEscaping","(Z)Z");
  final int characters = cpg.addMethodref(TRANSLET_CLASS,
            CHARACTERSW,
            CHARACTERSW_SIG);
View Full Code Here

      "("+OBJECT_SIG+STRING_SIG+STRING_SIG+TRANSLET_SIG+DOM_INTF_SIG+")"+
      NODE_ITERATOR_SIG;
  final int docIdx = cpg.addMethodref(LOAD_DOCUMENT_CLASS,
              "document", docParamList);

  final int uriIdx = cpg.addInterfaceMethodref(DOM_INTF,
                 "getDocumentURI",
                 "(I)"+STRING_SIG);

  final int nextIdx = cpg.addInterfaceMethodref(NODE_ITERATOR,
                  NEXT, NEXT_SIG);
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.