1 30 31 package oracle.toplink.libraries.asm.tree; 32 33 import oracle.toplink.libraries.asm.Label; 34 import oracle.toplink.libraries.asm.Constants; 35 import oracle.toplink.libraries.asm.CodeVisitor; 36 37 import java.util.ArrayList ; 38 import java.util.Arrays ; 39 import java.util.List ; 40 41 46 47 public class TableSwitchInsnNode extends AbstractInsnNode { 48 49 52 53 public int min; 54 55 58 59 public int max; 60 61 64 65 public Label dflt; 66 67 71 72 public final List labels; 73 74 83 84 public TableSwitchInsnNode ( 85 final int min, 86 final int max, 87 final Label dflt, 88 final Label[] labels) 89 { 90 super(Constants.TABLESWITCH); 91 this.min = min; 92 this.max = max; 93 this.dflt = dflt; 94 this.labels = new ArrayList (); 95 if (labels != null) { 96 this.labels.addAll(Arrays.asList(labels)); 97 } 98 } 99 100 public void accept (final CodeVisitor cv) { 101 Label[] labels = new Label[this.labels.size()]; 102 this.labels.toArray(labels); 103 cv.visitTableSwitchInsn(min, max, dflt, labels); 104 } 105 } 106 | Popular Tags |