Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.GOTO


      }
      else {
    il.append(loadLocal);
      }

      final BranchHandle exit = il.append(new GOTO(null));
      _loop = il.append(methodGen.loadDOM());
      il.append(loadLocal);
      local.setEnd(_loop);
      il.append(new GOTO(parent));
      exit.setTarget(il.append(NOP));
      _left.backPatchFalseList(_loop);

      _trueList.append(_left._trueList)
  }
View Full Code Here


        il.append(factory.createInvoke(ClassEnhancer.CN_StateManager, "isDirty", Type.BOOLEAN, new Type[]{BCELClassEnhancer.OT_PersistenceCapable},
            Constants.INVOKEINTERFACE));

        if (!enhancer.getClassMetaData().isDetachable())
        {
            GOTO go = new GOTO(null);
            il.append(go);
            InstructionHandle ifnullTarget = il.append(InstructionConstants.ICONST_0);
            InstructionHandle gotoTarget = il.append(InstructionConstants.IRETURN);
            ifnull.setTarget(ifnullTarget);
            go.setTarget(gotoTarget);
        }
        else
        {
            il.append(InstructionConstants.IRETURN);
View Full Code Here

                    "jdo"+BCELUtils.getSetterName(fieldName),
                    Type.VOID,
                    new Type[] { field.getType() },
                    Constants.INVOKEVIRTUAL));
            }
            gotoLast[i] = new GOTO(null);
            il.append(gotoLast[i]);
        }
        if (cmd.getPersistenceCapableSuperclass() == null)
        {
            swichDefaultBlock =
View Full Code Here

        BCELMember targetField = fieldConfig.getEnhanceField();
        Type smType = BCELUtils.getJDOMethodType(targetField.getType());
        Type nativeType = targetField.getType();
        String fieldName = targetField.getName();
        InstructionHandle last;
        GOTO go[] = new GOTO[2];
        go[0] = new GOTO(null);
        go[1] = new GOTO(null);
        il.append(InstructionConstants.ALOAD_0);
        il.append(factory.createGetField(className, ClassEnhancer.FN_StateManager, BCELClassEnhancer.OT_StateManager));
        BranchInstruction hasStateManager = new IFNONNULL(null);
        il.append(hasStateManager);
        il.append(InstructionConstants.ALOAD_0);
View Full Code Here

        insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, STACK_METHOD, STACK_TYPE,
                       Type.NO_ARGS, Constants.INVOKEVIRTUAL));
        InstructionHandle restore_handle = insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));

        // if not continuation exists, create empty stack
        insList.insert(new GOTO(firstIns));
        insList.insert(InstructionFactory.createStore(STACK_TYPE, method.getMaxLocals()+1));
        insList.insert(insFactory.createInvoke(STACK_CLASS, Constants.CONSTRUCTOR_NAME, Type.VOID, Type.NO_ARGS, Constants. INVOKESPECIAL));
        insList.insert(InstructionFactory.createDup(STACK_TYPE.getSize()));
        insList.insert(insFactory.createNew(STACK_TYPE));
View Full Code Here

        Type[] paramTypes = getParamTypes(method.getConstantPool().getConstantPool(), inv.getIndex());
        for (int j = 0; j < paramTypes.length; j++) {
            insList.append(InstructionFactory.createNull(paramTypes[j]));
        }
        // go to last invocation
        insList.append(new GOTO(handle));
        return insList;
    }
View Full Code Here

      il.append(SWAP);
      il.append(new INVOKEVIRTUAL(lookupKey));
  }

  _trueList.add(il.append(new IFNE(null)));
  _falseList.add(il.append(new GOTO(null)));
    }
View Full Code Here

    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          BooleanType type) {
  final InstructionList il = methodGen.getInstructionList();
  FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
  il.append(ICONST_1);
  final BranchHandle truec = il.append(new GOTO(null));
  falsel.backPatch(il.append(ICONST_0));
  truec.setTarget(il.append(NOP));
    }
View Full Code Here

  final InstructionList il = methodGen.getInstructionList();
  getFirstNode(classGen, methodGen);
  il.append(DUP);
  final BranchHandle falsec = il.append(new IFLT(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

    public void translateTo(ClassGenerator classGen, MethodGenerator methodGen,
          BooleanType type) {
  final InstructionList il = methodGen.getInstructionList();
  FlowList falsel = translateToDesynthesized(classGen, methodGen, type);
  il.append(ICONST_1);
  final BranchHandle truec = il.append(new GOTO(null));
  falsel.backPatch(il.append(ICONST_0));
  truec.setTarget(il.append(NOP));
    }
View Full Code Here

TOP

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

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.