Class Bytecodes.SWITCH

  extended by joeq.Compiler.BytecodeAnalysis.Bytecodes.SWITCH
All Implemented Interfaces:
Enclosing interface:

public static final class Bytecodes.SWITCH
extends Object
implements Bytecodes.CompoundInstruction

Constructor Summary
Bytecodes.SWITCH(int[] match, ArrayList targets, Bytecodes.InstructionHandle target)
Bytecodes.SWITCH(int[] match, ArrayList targets, Bytecodes.InstructionHandle target, int max_gap)
          Template for switch() constructs.
Method Summary
 Bytecodes.Instruction getInstruction()
 Bytecodes.InstructionList getInstructionList()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public Bytecodes.SWITCH(int[] match,
                        ArrayList targets,
                        Bytecodes.InstructionHandle target,
                        int max_gap)
Template for switch() constructs. If the match array can be sorted in ascending order with gaps no larger than max_gap between the numbers, a TABLESWITCH instruction is generated, and a LOOKUPSWITCH otherwise. The former may be more efficient, but needs more space. Note, that the key array always will be sorted, though we leave the original arrays unaltered.

match - array of match values (case 2: ... case 7: ..., etc.)
targets - the instructions to be branched to for each case
target - the default target
max_gap - maximum gap that may between case branches


public Bytecodes.SWITCH(int[] match,
                        ArrayList targets,
                        Bytecodes.InstructionHandle target)
Method Detail


public final Bytecodes.InstructionList getInstructionList()
Specified by:
getInstructionList in interface Bytecodes.CompoundInstruction


public final Bytecodes.Instruction getInstruction()

Copyright © 2001-2008 John Whaley. All Rights Reserved.