Examples of INVOKEVIRTUAL


Examples of org.apache.bcel.generic.INVOKEVIRTUAL

      il.append(DUP);
      il.append(new PUSH(cpg, _name.toString()));
      il.append(DUP_X1);
      il.append(methodGen.loadCurrentNode());
      _use.translate(classGen, methodGen);
      il.append(new INVOKEVIRTUAL(key));
     
      il.append(methodGen.loadDOM());
      il.append(new INVOKEVIRTUAL(keyDom));
  }
 
  // Get the next node from the iterator and do loop again...
  final InstructionHandle skip = il.append(NOP);
 
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

        } else {
            oldMethCopyOutIL.append(InstructionConstants.THIS);
            oldMethCopyOutIL.append(InstructionConstants.SWAP);
            outlinedMethodRef =
                oldMethCopyOutIL.append(
                    new INVOKEVIRTUAL(cpg.addMethodref(
                                          classGen.getClassName(),
                                          outlinedMethodName,
                                          outlinedMethodGen.getSignature())));
        }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

 
  il.append(methodGen.loadDOM());
  il.append(new ILOAD(_currentIndex));
  il.append(new INVOKEINTERFACE(git, 2));
  il.append(methodGen.loadHandler());
  il.append(new INVOKEVIRTUAL(applyTemplates));
  il.append(new GOTO_W(next));
  return il;
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

    il.append(new CHECKCAST(cpg.addClass(classGen.getDOMClass())));
    il.append(SWAP);
    index = cpg.addMethodref(MULTI_DOM_CLASS,
           "addDOMAdapter",
           "(" + DOM_ADAPTER_SIG + ")I");
    il.append(new INVOKEVIRTUAL(index));
    il.append(POP);    // ignore mask returned by addDOMAdapter
      }
  }

  // Restore old handler base from stack
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

      il.append(classGen.loadTranslet());
      il.append(methodGen.loadDOM());
      il.append(methodGen.loadIterator());
      il.append(methodGen.loadHandler());
      il.append(methodGen.loadCurrentNode());
      il.append(new INVOKEVIRTUAL(cpg.addMethodref(className,
               methodName,
               "("
               + DOM_INTF_SIG
               + NODE_ITERATOR_SIG
               + TRANSLET_OUTPUT_SIG
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

          // Push parameter frame
          final int push = cpg.addMethodref(TRANSLET_CLASS,
                    PUSH_PARAM_FRAME,
                    PUSH_PARAM_FRAME_SIG);
          il.append(classGen.loadTranslet());
          il.append(new INVOKEVIRTUAL(push));
          translateContents(classGen, methodGen);
      }
  }

        // Generate a valid Java method name
  final String className = stylesheet.getClassName();
        String methodName = Util.escape(_name.toString());

        // Load standard arguments
  il.append(classGen.loadTranslet());
  il.append(methodGen.loadDOM());
  il.append(methodGen.loadIterator());
  il.append(methodGen.loadHandler());
  il.append(methodGen.loadCurrentNode());
       
        // Initialize prefix of method signature
  StringBuffer methodSig = new StringBuffer("(" + DOM_INTF_SIG
            + NODE_ITERATOR_SIG + TRANSLET_OUTPUT_SIG + NODE_SIG);
 
        // If calling a simply named template, push actual arguments
  if (_calleeTemplate != null) {
      Vector calleeParams = _calleeTemplate.getParameters();
      int numParams = _parameters.length;
     
      for (int i = 0; i < numParams; i++) {
          SyntaxTreeNode node = (SyntaxTreeNode)_parameters[i];
                methodSig.append(OBJECT_SIG);   // append Object to signature
               
                // Push 'null' if Param to indicate no actual parameter specified
                if (node instanceof Param) {
                    il.append(ACONST_NULL);
                }
                else // translate WithParam
                    node.translate(classGen, methodGen);
                }
            }
        }

        // Complete signature and generate invokevirtual call
  methodSig.append(")V");
  il.append(new INVOKEVIRTUAL(cpg.addMethodref(className,
                 methodName,
                 methodSig.toString())));
 
  // Do not need to call Translet.popParamFrame() if we are
  // calling a simple named template.
  if (_calleeTemplate == null && (stylesheet.hasLocalParams() || hasContents())) {
      // Pop parameter frame
      final int pop = cpg.addMethodref(TRANSLET_CLASS,
               POP_PARAM_FRAME,
               POP_PARAM_FRAME_SIG);
      il.append(classGen.loadTranslet());
      il.append(new INVOKEVIRTUAL(pop));
  }
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

  // 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
  if (hasPredicates()) {
      final int n = _predicates.size();
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

  // Generete the value of the parameter (use value in 'select' by def.)
  translateValue(classGen, methodGen);
  // Mark this parameter value is not being the default value
  il.append(new PUSH(cpg, false));
  // Pass the parameter to the template
  il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
                 ADD_PARAMETER,
                 ADD_PARAMETER_SIG)));
  il.append(POP); // cleanup stack
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

  }
  else {
      il.append(classGen.loadTranslet());
      _select.translate(classGen, methodGen);
      il.append(methodGen.loadHandler());
      il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,
               CHARACTERSW,
               CHARACTERSW_SIG)));
  }

    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKEVIRTUAL

  // Call getKeyIndex in AbstractTranslet with the name of the key
  // to get the index for this key (which is also a node iterator).
  il.append(classGen.loadTranslet());
  il.append(new PUSH(cpg,_index));
  il.append(new INVOKEVIRTUAL(getKeyIndex));
 
  // Now use the value in the second argument to determine what nodes
  // the iterator should return.
  il.append(SWAP);
  il.append(new PUSH(cpg,_value));
  if (this instanceof IdPattern)
      il.append(new INVOKEVIRTUAL(lookupId));
  else
      il.append(new INVOKEVIRTUAL(lookupKey));

  _trueList.add(il.append(new IFNE(null)));
  _falseList.add(il.append(new GOTO(null)));
    }
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.