Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.INVOKEINTERFACE


         "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()));
  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);
  il.append(methodGen.storeHandler());

  // Call startDocument on the new handler
  il.append(methodGen.startDocument());
View Full Code Here


      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));
      _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

      _select.translate(classGen, methodGen)
      _select.startResetIterator(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(ICONST_1);
      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

  }

  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

            if (!(ins instanceof INVOKEINTERFACE)) {
                continue;
            }

            INVOKEINTERFACE invoke = (INVOKEINTERFACE) ins;
            String mName = invoke.getMethodName(cpg);
            if (!mName.equals("setAttribute")) {
                continue;
            }
            String cName = invoke.getClassName(cpg);
            if (!cName.equals("javax.servlet.http.HttpSession")) {
                continue;
            }

            TypeFrame frame = typeDataflow.getFactAtLocation(location);
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

      // Handle elements="ns:*" type rule
      if (rule.getStrength() == RULE_NAMESPACE) {
    il.append(new ALOAD(paramDom));
    il.append(new ILOAD(paramCurrent));
    il.append(new INVOKEINTERFACE(gns,2));
    il.append(new PUSH(cpg, rule.getNamespace()));
    il.append(new INVOKEVIRTUAL(strcmp));
    il.append(ICONST_0);

    if (rule.getAction() == STRIP_SPACE) {
View Full Code Here

                 "getAxisIterator",
                 "(I)"+
                 NODE_ITERATOR_SIG);
      il.append(methodGen.loadDOM());
      il.append(new PUSH(cpg, Axis.CHILD));
      il.append(new INVOKEINTERFACE(children, 2));
  }
  else {
      nodeSet.translate(classGen, methodGen);
  }
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

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.