Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.TABLESWITCH


  // Compile def. target for switch statement if key has multiple levels
  if (levels > 1) {
      // Append the default target - it will _NEVER_ be reached
      InstructionHandle defaultTarget =
    il.append(new PUSH(cpg, EMPTYSTRING));
      il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
      il.append(ARETURN);
  }

  return extractMethod;
    }
View Full Code Here


  // Compile def. target for switch statement if key has multiple levels
  if (levels > 1) {
      // Append the default target - it will _NEVER_ be reached
      InstructionHandle defaultTarget =
    il.append(new PUSH(cpg, EMPTYSTRING));
      il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
      il.append(ARETURN);
  }

  return extractMethod;
    }
View Full Code Here

  // Compile def. target for switch statement if key has multiple levels
  if (levels > 1) {
      // Append the default target - it will _NEVER_ be reached
      InstructionHandle defaultTarget =
    il.append(new PUSH(cpg, EMPTYSTRING));
      il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
      il.append(ARETURN);
  }

  extractMethod.stripAttributes(true);
  extractMethod.setMaxLocals();
View Full Code Here

                    Type.VOID,
                    new Type[] { pcscType, Type.INT },
                    Constants.INVOKESPECIAL));

        }
        TABLESWITCH switchInstruction =
            new TABLESWITCH(fieldIndexes, switchTable, swichDefaultBlock);
        il.insert(swichBlock, switchInstruction);
        last = il.append(InstructionConstants.RETURN);
        for (int i = 0; i < gotoLast.length; i++)
        {
            gotoLast[i].setTarget(last);
View Full Code Here

                    (Type[])this.argTypes,
                    Constants.INVOKESPECIAL));
            il.append(InstructionConstants.RETURN);
        }

        TABLESWITCH switchInstruction =
            new TABLESWITCH(fieldIndexes, switchTable, swichDefaultBlock);
        il.insert(switchTable[0], switchInstruction);
    }
View Full Code Here

                    Constants.INVOKESPECIAL));

            il.append(InstructionConstants.RETURN);
        }

        TABLESWITCH switchInstruction =
            new TABLESWITCH(fieldIndexes, switchTable, swichDefaultBlock);
        il.insert(swichBlock, switchInstruction);
    }
View Full Code Here

            }
            invokeIns.copyInto(tableTargets);
            insList.insert(restorer);

            // select frame restorer
            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));
View Full Code Here

  // Compile def. target for switch statement if key has multiple levels
  if (levels > 1) {
      // Append the default target - it will _NEVER_ be reached
      InstructionHandle defaultTarget =
    il.append(new PUSH(cpg, EMPTYSTRING));
      il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
      il.append(ARETURN);
  }

  extractMethod.stripAttributes(true);
  extractMethod.setMaxLocals();
View Full Code Here

  // Compile def. target for switch statement if key has multiple levels
  if (levels > 1) {
      // Append the default target - it will _NEVER_ be reached
      InstructionHandle defaultTarget =
    il.append(new PUSH(cpg, EMPTYSTRING));
      il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
      il.append(ARETURN);
  }

  extractMethod.stripAttributes(true);
  extractMethod.setMaxLocals();
View Full Code Here

  // Compile def. target for switch statement if key has multiple levels
  if (levels > 1) {
      // Append the default target - it will _NEVER_ be reached
      InstructionHandle defaultTarget =
    il.append(new PUSH(cpg, EMPTYSTRING));
      il.insert(tblswitch,new TABLESWITCH(match, target, defaultTarget));
      il.append(ARETURN);
  }

  extractMethod.stripAttributes(true);
  extractMethod.setMaxLocals();
View Full Code Here

TOP

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

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.