Examples of INVOKESTATIC


Examples of org.apache.bcel.generic.INVOKESTATIC

     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          StringType type) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new INVOKESTATIC(cpg.addMethodref(INTEGER_CLASS,
                "toString",
                "(I)" + STRING_SIG)));
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

               + tleft.toSignature()
               + tright.toSignature()
               + "I"
               + DOM_INTF_SIG
               + ")Z");
      il.append(new INVOKESTATIC(cmp));
      return;
  }

  // Next, node-set/t for t in {real, string, node-set, result-tree}
  _left.translate(classGen, methodGen);
  _left.startIterator(classGen, methodGen);
  _right.translate(classGen, methodGen);
  _right.startIterator(classGen, methodGen);

  // Cast a result tree to a string to use an existing compare
  if (tright instanceof ResultTreeType) {
      tright.translateTo(classGen, methodGen, Type.String)
      tright = Type.String;
  }

  // Call the appropriate compare() from the BasisLibrary
  il.append(new PUSH(cpg, _op));
  il.append(methodGen.loadDOM());

  final int compare = cpg.addMethodref(BASIS_LIBRARY_CLASS,
               "compare",
               "("
               + tleft.toSignature()
               + tright.toSignature()
               + "I"
               + DOM_INTF_SIG
               + ")Z");
  il.append(new INVOKESTATIC(compare));
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

  }
  else {
      _name.translate(classGen, methodGen);
  }
  il.append(new INVOKEVIRTUAL(get));
  il.append(new INVOKESTATIC(fn3arg));
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

         + NODE_ITERATOR_SIG
         + ")" + NODE_COUNTER_SIG);
  il.append(classGen.loadTranslet());
  il.append(methodGen.loadDOM());
  il.append(methodGen.loadIterator());
  il.append(new INVOKESTATIC(index));
  il.append(DUP);

  // Store the node counter in the field
  il.append(classGen.loadTranslet());
  il.append(SWAP);
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

      // Using java.lang.Math.floor(number + 0.5) to return a double value
            il.append(new PUSH(cpg, 0.5));
            il.append(DADD);
      index = cpg.addMethodref(MATH_CLASS, "floor", "(D)D");
      il.append(new INVOKESTATIC(index));

      // Call setValue on the node counter
      index = cpg.addMethodref(NODE_COUNTER,
             "setValue",
             "(D)" + NODE_COUNTER_SIG);
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

            // call checkQName if the name is an AVT
            final int check = cpg.addMethodref(BASIS_LIBRARY_CLASS, "checkQName",
                            "("
                            +STRING_SIG
                            +")V");                
            il.append(new INVOKESTATIC(check));
           
            // Push handler for call to endElement()
            il.append(methodGen.loadHandler());        
           
            // load name value again
            nameValue.setEnd(il.append(new ALOAD(nameValue.getIndex())));
                   
      if (_namespace != null) {
    _namespace.translate(classGen, methodGen);
      }
      else {
                // If name is an AVT and namespace is not specified, need to
                // look up any prefix in the stylesheet by calling
                //   BasisLibrary.lookupStylesheetQNameNamespace(
                //                name, stylesheetNode, ancestorsArray,
                //                prefixURIsIndexArray, prefixURIPairsArray,
                //                !ignoreDefaultNamespace)
                String transletClassName = getXSLTC().getClassName();
                il.append(DUP);
                il.append(new PUSH(cpg, getNodeIDForStylesheetNSLookup()));
                il.append(new GETSTATIC(cpg.addFieldref(
                                             transletClassName,
                                             STATIC_NS_ANCESTORS_ARRAY_FIELD,
                                             NS_ANCESTORS_INDEX_SIG)));
                il.append(new GETSTATIC(cpg.addFieldref(
                                             transletClassName,
                                             STATIC_PREFIX_URIS_IDX_ARRAY_FIELD,
                                             PREFIX_URIS_IDX_SIG)));
                il.append(new GETSTATIC(cpg.addFieldref(
                                             transletClassName,
                                             STATIC_PREFIX_URIS_ARRAY_FIELD,
                                             PREFIX_URIS_ARRAY_SIG)));
                // Default namespace is significant
                il.append(ICONST_0);
                il.append(
                    new INVOKESTATIC(
                        cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                           LOOKUP_STYLESHEET_QNAME_NS_REF,
                                           LOOKUP_STYLESHEET_QNAME_NS_SIG)));
      }

            // Push additional arguments
      il.append(methodGen.loadHandler());
      il.append(methodGen.loadDOM());
      il.append(methodGen.loadCurrentNode());
       
            // Invoke BasisLibrary.startXslElemCheckQName()
            il.append(new INVOKESTATIC(
            cpg.addMethodref(BASIS_LIBRARY_CLASS, "startXslElement",
                    "(" + STRING_SIG
                    + STRING_SIG
                    + TRANSLET_OUTPUT_SIG
                    + DOM_INTF_SIG + "I)" + STRING_SIG)));               
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          StringType type) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS,
                "realToString",
                "(D)" + STRING_SIG)));
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          IntType type) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS,
                "realToInt","(D)I")));
    }
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

            // call checkNCName if the name is an AVT
            final int check = cpg.addMethodref(BASIS_LIBRARY_CLASS, "checkNCName",
                                "("
                                +STRING_SIG
                                +")V");                
                                il.append(new INVOKESTATIC(check));
           
            // Save the current handler base on the stack
            il.append(methodGen.loadHandler());
            il.append(DUP);     // first arg to "attributes" call           
           
View Full Code Here

Examples of org.apache.bcel.generic.INVOKESTATIC

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

  // Get two copies of the argument on the stack
        argument().translate(classGen, methodGen);   
                il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS,
                                                            "roundF", "(D)D")));
    }
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.