Package com.sun.org.apache.bcel.internal.generic

Examples of com.sun.org.apache.bcel.internal.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);
  }

  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);
        }

        return extractMethod;
    }
View Full Code Here

    final InstructionHandle[] targets = new InstructionHandle[matches.length] ;
    int i = 0 ;
    for(Integer match: cswitches.keySet()) {
      matches[i++] = match.intValue() ;
    }
    final TABLESWITCH ret = new TABLESWITCH(matches,targets,null) ;
    ilc.addBranch(ret,def) ;
    int j = 0 ;
    for(final Mark mi: cswitches.values()) {
      ilc.addPostProcessor(mi,new SelectPostProcessor(ret,j++));
    }
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 com.sun.org.apache.bcel.internal.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.