Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.INVOKESTATIC


  }
  else {      // one argument
      argument().translate(classGen, methodGen);
  }
  final ConstantPoolGen cpg = classGen.getConstantPool();
  il.append(new INVOKESTATIC(cpg.addMethodref(BASIS_LIBRARY_CLASS,
                "generate_idF",
                // reuse signature
                GET_NODE_NAME_SIG)));
    }
View Full Code Here


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

               + 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

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

          "("   
           + "Lorg/w3c/dom/NodeList;"
           + TRANSLET_INTF_SIG
           + DOM_INTF_SIG
           + ")" + NODE_ITERATOR_SIG );
     il.append(new INVOKESTATIC(convert));
  }
  else if (clazz.getName().equals("org.w3c.dom.Node")) {
     // w3c Node is on the stack from the external Java function call.
     // call BasisLibrary.node2Iterator() to consume Node and leave
     // Iterator on the stack.
     il.append(classGen.loadTranslet());   // push translet onto stack
     il.append(methodGen.loadDOM());      // push DOM onto stack
     final int convert = cpg.addMethodref(BASIS_LIBRARY_CLASS,
          "node2Iterator",
          "("   
           + "Lorg/w3c/dom/Node;"
           + TRANSLET_INTF_SIG
           + DOM_INTF_SIG
           + ")" + NODE_ITERATOR_SIG );
     il.append(new INVOKESTATIC(convert));
  }
  else {
      ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
    toString(), clazz.getName());
      classGen.getParser().reportError(Constants.FATAL, err);
View Full Code Here

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

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

    }

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  argument().translate(classGen, methodGen);
  methodGen.getInstructionList()
      .append(new INVOKESTATIC(classGen.getConstantPool()
             .addMethodref(MATH_CLASS,
               "floor", "(D)D")));
    }
View Full Code Here

    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  argument(0).translate(classGen, methodGen);
  il.append(new INVOKESTATIC(cpg.addMethodref(MATH_CLASS,
                "ceil", "(D)D")));
    }
View Full Code Here

     
      final int unsupportedElem = cpg.addMethodref(BASIS_LIBRARY_CLASS, "unsupported_ElementF",
                                                         "(" + STRING_SIG + "Z)V");  
      il.append(new PUSH(cpg, getQName().toString()));
      il.append(new PUSH(cpg, _isExtension));
      il.append(new INVOKESTATIC(unsupportedElem));   
  }
    }
View Full Code Here

TOP

Related Classes of org.apache.bcel.generic.INVOKESTATIC

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.