Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.IFEQ


        if( (fieldConfig.getJdoFieldFlag() & PersistenceCapable.CHECK_WRITE) == PersistenceCapable.CHECK_WRITE)
        {
            // (flag == 0)
            il.append(InstructionConstants.ALOAD_0);
            il.append(factory.createGetField(className, ClassEnhancer.FN_Flag, Type.BYTE));
            flgIsZero = new IFEQ(null);
            il.append(flgIsZero);
        }
        il.append(InstructionConstants.ALOAD_0);
        il.append(factory.createGetField(className, ClassEnhancer.FN_StateManager, BCELClassEnhancer.OT_StateManager));
        BranchInstruction hasStateManager = new IFNULL(null);
View Full Code Here


            insList.insert(new TABLESWITCH(match, tableTargets, firstIns));
            insList.insert(insFactory.createInvoke(STACK_CLASS, getPopMethod(Type.INT), Type.INT, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            insList.insert(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));

            // test if the continuation should be restored
            insList.insert(new IFEQ(firstIns));
            insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, RESTORING_METHOD, Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));
        }

        // get stack from current continuation and store in the last local variable
View Full Code Here

                insList.append(new SWAP());
                insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(Type.OBJECT), Type.VOID, new Type[]{Type.OBJECT}, Constants.INVOKEVIRTUAL));
            }
        }
        // add isCapturing test
        insList.insert(new IFEQ(handle.getNext()));
        // test if the continuation should be captured after the invocation
        insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, CAPURING_METHOD, Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
        insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));
        // test if continuation exists
        insList.insert(new IFNULL(handle.getNext()));
View Full Code Here

    }

    public void desynthesize(ClassGenerator classGen,
           MethodGenerator methodGen) {
  final InstructionList il = methodGen.getInstructionList();
  _falseList.add(il.append(new IFEQ(null)));
    }
View Full Code Here

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

  il.append(new INVOKEVIRTUAL(cpg.addMethodref(STRING_CLASS,
                 "length", "()I")));
  return new FlowList(il.append(new IFEQ(null)));
    }
View Full Code Here

     */
    public FlowList translateToDesynthesized(ClassGenerator classGen,
               MethodGenerator methodGen,
               BooleanType type) {
  final InstructionList il = methodGen.getInstructionList();
  return new FlowList(il.append(new IFEQ(null)));
    }
View Full Code Here

     * @see  org.apache.xalan.xsltc.compiler.util.Type#translateTo
     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          BooleanType type) {
  final InstructionList il = methodGen.getInstructionList();
  final BranchHandle falsec = il.append(new IFEQ(null));
  il.append(ICONST_1);
  final BranchHandle truec = il.append(new GOTO(null));
  falsec.setTarget(il.append(ICONST_0));
  truec.setTarget(il.append(NOP));
    }
View Full Code Here

     */
    public FlowList translateToDesynthesized(ClassGenerator classGen,
               MethodGenerator methodGen,
               BooleanType type) {
  final InstructionList il = methodGen.getInstructionList();
  return new FlowList(il.append(new IFEQ(null)));
    }
View Full Code Here

     */
    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          StringType type) {
  final ConstantPoolGen cpg = classGen.getConstantPool();
  final InstructionList il = methodGen.getInstructionList();
  final BranchHandle falsec = il.append(new IFEQ(null));
  il.append(new PUSH(cpg, "true"));
  final BranchHandle truec = il.append(new GOTO(null));
  falsec.setTarget(il.append(new PUSH(cpg, "false")));
  truec.setTarget(il.append(NOP));
    }
View Full Code Here

    public FlowList translateToDesynthesized(ClassGenerator classGen,
               MethodGenerator methodGen,
               BooleanType type) {
  final InstructionList il = methodGen.getInstructionList();
  translateTo(classGen, methodGen, Type.Boolean);
  return new FlowList(il.append(new IFEQ(null)));
    }
View Full Code Here

TOP

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

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.