Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.INVOKESTATIC


    //ASTIdent   fun   = f.getName();
    ASTIdent[] args  = f.getArgs();
    String     class_name = method.getClassName();

    if(fname.equals("READ")) {
        il.append(new INVOKESTATIC(cp.addMethodref(class_name,
                   "_readInt",
                   "()I")));
    } else if(fname.equals("WRITE")) {
      exprs[0].byte_code(il, method, cp);
      ASTFunDecl.pop();
      il.append(new INVOKESTATIC(cp.addMethodref(class_name,
             "_writeInt",
             "(I)I")));
    }
    else { // Normal function
      int size    = exprs.length;
      Type[] argv = null;

      if(exprs != null) {
  argv = new Type[size];

  for(int i=0; i < size; i++) {
    argv[i] = Type.INT;
    exprs[i].byte_code(il, method, cp);
  }

  //ASTFunDecl.push(size);
      }

      ASTFunDecl.pop(size);

      // Function call
      il.append(new INVOKESTATIC(cp.addMethodref(class_name,
             fname,
             Type.getMethodSignature(Type.INT,
                   argv))));
    }
View Full Code Here


                    if (DEBUG) {
                        System.out.println("Handling field access: " + location.getHandle() + " (frame="
                                + vnaDataflow.getFactAtLocation(location) + ") :" + n);
                    }
                } else if (ins instanceof INVOKESTATIC) {
                    INVOKESTATIC inv = (INVOKESTATIC) ins;
                    InnerClassAccess access = icam.getInnerClassAccess(inv, cpg);
                    if (access != null && access.getMethodSignature().equals(inv.getSignature(cpg))) {
                        xfield = access.getField();
                        isWrite = !access.isLoad();
                        isLocal = false;
                        if (DEBUG) {
                            System.out.println("Handling inner class access: " + location.getHandle() + " (frame="
View Full Code Here

            "(Ljava/lang/String;)V")));
    il.append(new GETSTATIC(_in));
    il.append(new INVOKEVIRTUAL(cp.addMethodref("java.io.BufferedReader",
            "readLine",
            "()Ljava/lang/String;")));
    il.append(new INVOKESTATIC(cp.addMethodref("java.lang.Integer",
            "parseInt",
            "(Ljava/lang/String;)I")));
    il.append(InstructionConstants.IRETURN);

    /* private static final int _readInt() throws IOException
View Full Code Here

        while (head != null) {
            Instruction i = head.getInstruction();


            if (i instanceof INVOKESTATIC) {
                INVOKESTATIC is = (INVOKESTATIC) i;
                String name = is.getMethodName(cpg);
                String signature = is.getSignature(cpg);
                if (name.startsWith("access$")) {
                    XMethod invoked = XFactory.createXMethod(is, cpg);
                    FieldDescriptor field = invoked.getAccessMethodForField();
                    if (field != null) {
                        boolean isSetter = signature.endsWith("V");
View Full Code Here

            ConstantPoolGen cpg, TypeDataflow typeDataflow) throws DataflowAnalysisException {

        InstructionHandle handle = location.getHandle();
        InstructionHandle next = handle.getNext();
        if (next != null && next.getInstruction() instanceof INVOKESTATIC) {
            INVOKESTATIC is = (INVOKESTATIC) next.getInstruction();
            if (is.getMethodName(cpg).equals("assertFalse")) {
                return;
            }
        }
        String sourceFile = jclass.getSourceFileName();
View Full Code Here

  }
  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

            // call checkQName if the name is an AVT
            final int check = cpg.addMethodref(BASIS_LIBRARY_CLASS, "checkAttribQName",
                            "("
                            +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

  il.append(methodGen.loadDOM());
  if (classGen instanceof FilterGenerator)
      il.append(new ILOAD(1));
  else
      il.append(methodGen.loadContextNode());
  il.append(new INVOKESTATIC(tst));
    }
View Full Code Here

  else if (_paramType == Type.Node) {
      _param.translate(classGen, methodGen);
  }
  else if (_paramType == Type.Reference) {
      _param.translate(classGen, methodGen);
      il.append(new INVOKESTATIC(cpg.addMethodref
               (BASIS_LIBRARY_CLASS,
          "referenceToNodeSet",
          "("
          + OBJECT_SIG
          + ")"
View Full Code Here

                + OBJECT_SIG 
                + TRANSLET_OUTPUT_SIG
                + NODE_SIG
                + DOM_INTF_SIG
                + ")V");
      il.append(new INVOKESTATIC(copy));
  }
  else {
      il.append(classGen.loadTranslet());
      _select.translate(classGen, methodGen);
      il.append(methodGen.loadHandler());
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.