Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.PUSH


          loggerAttribute.getName(),
          loggerAttribute.getType()));
       
     
      il.insert(firstInstructionHandle,
        new PUSH(cp, clazz.getClassName())
      );
      il.insert(firstInstructionHandle,
        new PUSH(cp, getMethodRepr(orig))
      );
     
   
      il.insert(
        firstInstructionHandle,
View Full Code Here


          loggerAttribute.getType()));
       
     
     
      il.insert(returnInstructionHandle,
        new PUSH(cp, clazz.getClassName())
      );
      il.insert(returnInstructionHandle,
        new PUSH(cp, getMethodRepr(orig))
      );
   
      il.insert(
      returnInstructionHandle,
            instFact.createInvoke(
View Full Code Here

        clazz.getClassName(),
        loggerAttribute.getName(),
        loggerAttribute.getType()));
       
    il.insert(firstInstructionHandle,
      new PUSH(cp, Transform.ENTER_STRING+ getMethodRepr(orig))
    );
   
   
    il.insert(
      firstInstructionHandle,
View Full Code Here

      clazz.getClassName(),
      loggerAttribute.getName(),
      loggerAttribute.getType()));
       
  il.insert(returnInstructionHandle,
    new PUSH(cp, Transform.EXIT_STRING+ getMethodRepr(orig))
  );
   
   
  il.insert(
  returnInstructionHandle,
View Full Code Here

          clazz.getClassName(),
          loggerAttribute.getName(),
          loggerAttribute.getType()));
       
      il.insert(firstInstructionHandle,
        new PUSH(cp, Transform.ENTER_STRING+ getMethodRepr(orig))
      );
   
   
      il.insert(
        firstInstructionHandle,
View Full Code Here

          clazz.getClassName(),
          loggerAttribute.getName(),
          loggerAttribute.getType()));
       
      il.insert(returnInstructionHandle,
        new PUSH(cp, Transform.EXIT_STRING+ getMethodRepr(orig))
      );
   
   
      il.insert(
      returnInstructionHandle,
View Full Code Here

                il,
                cp);
        il.append(factory.createGetStatic("java/lang/System",
                "out",
                printStreamT));
        il.append(new PUSH(cp, "Hello world!"));
        il.append(factory.createInvoke("java.io.PrintStream",
                "println",
                org.apache.bcel.generic.Type.VOID,
                new org.apache.bcel.generic.Type[] { org.apache.bcel.generic.Type.STRING },
                Constants.INVOKESPECIAL));
View Full Code Here

  // run-time error message for unsupported external functions
  else if (unresolvedExternal) {
      index = cpg.addMethodref(BASIS_LIBRARY_CLASS,
             "unresolved_externalF",
             "(Ljava/lang/String;)V");
      il.append(new PUSH(cpg, _fname.toString()));
      il.append(new INVOKESTATIC(index));
  }
  else if (_isExtConstructor) {
      final String clazz =
    _chosenConstructor.getDeclaringClass().getName();
View Full Code Here

            il.append(InstructionFactory.createThis());
            il.append(fac.createGetField(clazz.getClassName(), dataField
                    .getName(), dataField.getType()));
        }

        il.append(new PUSH(cp, methodArgTypes.length));
        il.append((Instruction) fac.createNewArray(Type.OBJECT, (short) 1));

        int index = 1;
        for (int i = 0; i < methodArgTypes.length; i++) {
            // dup array ref
            il.append(InstructionConstants.DUP);

            // push index
            il.append(new PUSH(cp, i));

            // transform parameter
            il.append(InstructionFactory.createLoad(methodArgTypes[i], index));
            emitCoerceToObject(il, fac, methodArgTypes[i]);
View Full Code Here

  il.append(DUP);
  final BranchHandle falsec = il.append(new IFEQ(null));
  Type.Node.translateTo(classGen, methodGen, type);
  final BranchHandle truec = il.append(new GOTO(null));
  falsec.setTarget(il.append(POP));
  il.append(new PUSH(classGen.getConstantPool(), ""));
  truec.setTarget(il.append(NOP));
    }
View Full Code Here

TOP

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

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.