Examples of INVOKEINTERFACE


Examples of org.apache.bcel.generic.INVOKEINTERFACE

      // 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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

                 "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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

      _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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

      // 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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

      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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

  final int gitr = cpg.addInterfaceMethodref(DOM_INTF,
              "getIterator",
              "()"+NODE_ITERATOR_SIG);
  il.append(toplevel.loadDOM());
  il.append(new INVOKEINTERFACE(gitr, 1));
        il.append(toplevel.nextNode());
  current.setStart(il.append(new ISTORE(current.getIndex())));

    // Create a new list containing variables/params + keys
    Vector varDepElements = new Vector(_globals);       
    Enumeration elements = elements();
    while (elements.hasMoreElements()) {
        final Object element = elements.nextElement();
        if (element instanceof Key) {
            varDepElements.add(element);
        }
    }
           
    // Determine a partial order for the variables/params and keys
    varDepElements = resolveDependencies(varDepElements);
   
    // Translate vars/params and keys in the right order
    final int count = varDepElements.size();
    for (int i = 0; i < count; i++) {
        final TopLevelElement tle = (TopLevelElement) varDepElements.elementAt(i);           
        tle.translate(classGen, toplevel);           
        if (tle instanceof Key) {
            final Key key = (Key) tle;
            _keys.put(key.getName(), key);
        }
    }

    // Compile code for other top-level elements
    Vector whitespaceRules = new Vector();
    elements = elements();
  while (elements.hasMoreElements()) {
      final Object element = elements.nextElement();
      // xsl:decimal-format
      if (element instanceof DecimalFormatting) {
    ((DecimalFormatting)element).translate(classGen,toplevel);
      }
      // xsl:strip/preserve-space
      else if (element instanceof Whitespace) {
    whitespaceRules.addAll(((Whitespace)element).getRules());
      }
  }

  // Translate all whitespace strip/preserve rules
  if (whitespaceRules.size() > 0) {
      Whitespace.translateRules(whitespaceRules,classGen);
  }

  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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

  // continue with globals initialization
  final int gitr = cpg.addInterfaceMethodref(DOM_INTF,
              "getIterator",
              "()"+NODE_ITERATOR_SIG);
  il.append(transf.loadDOM());
  il.append(new INVOKEINTERFACE(gitr, 1));
        il.append(transf.nextNode());
  current.setStart(il.append(new ISTORE(current.getIndex())));

  // Transfer the output settings to the output post-processor
  il.append(classGen.loadTranslet());
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEINTERFACE

              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

Examples of org.apache.bcel.generic.INVOKEINTERFACE

      final int esc = cpg.addInterfaceMethodref(OUTPUT_HANDLER,
                  "setEscaping", "(Z)Z");
      if (!_escaping) {
    il.append(methodGen.loadHandler());
    il.append(new PUSH(cpg, false));
    il.append(new INVOKEINTERFACE(esc, 2));
      }

            il.append(methodGen.loadHandler());

            // Call characters(String) or characters(char[],int,int), as
            // appropriate.
            if (!canLoadAsArrayOffsetLength()) {
                final int characters = cpg.addInterfaceMethodref(OUTPUT_HANDLER,
                                                           "characters",
                                                           "("+STRING_SIG+")V");
                il.append(new PUSH(cpg, _text));
                il.append(new INVOKEINTERFACE(characters, 2));
            } else {
                final int characters = cpg.addInterfaceMethodref(OUTPUT_HANDLER,
                                                                 "characters",
                                                                 "([CII)V");
                loadAsArrayOffsetLength(classGen, methodGen);
          il.append(new INVOKEINTERFACE(characters, 4));
            }

      // Restore character escaping setting to whatever it was.
      // Note: setEscaping(bool) returns the original (old) value
      if (!_escaping) {
    il.append(methodGen.loadHandler());
    il.append(SWAP);
    il.append(new INVOKEINTERFACE(esc, 2));
    il.append(POP);
      }
  }
  translateContents(classGen, methodGen);
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEINTERFACE

  // Returns the string value for a node in the DOM
  final int getNamespace = cpg.addInterfaceMethodref(DOM_INTF,
                 "getNamespaceName",
                 "(I)"+STRING_SIG);
  super.translate(classGen, methodGen);
  il.append(new INVOKEINTERFACE(getNamespace, 2));
    }
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.