FileDocCategorySizeDatePackage
LookupSwitchInsnNode.javaAPI DocGlassfish v2 API3568Thu Mar 02 11:51:16 GMT 2006oracle.toplink.libraries.asm.tree

LookupSwitchInsnNode

public class LookupSwitchInsnNode extends AbstractInsnNode
A node that represents a LOOKUPSWITCH instruction.
author
Eric Bruneton

Fields Summary
public Label
dflt
Beginning of the default handler block.
public final List
keys
The values of the keys. This list is a list a {@link java.lang.Integer Integer} objects.
public final List
labels
Beginnings of the handler blocks. This list is a list of {@link Label Label} objects.
Constructors Summary
public LookupSwitchInsnNode(Label dflt, int[] keys, Label[] labels)
Constructs a new {@link LookupSwitchInsnNode LookupSwitchInsnNode} object.

param
dflt beginning of the default handler block.
param
keys the values of the keys.
param
labels beginnings of the handler blocks. labels[i] is the beginning of the handler block for the keys[i] key.

    super(Constants.LOOKUPSWITCH);
    this.dflt = dflt;
    this.keys = new ArrayList();
    this.labels = new ArrayList();
    if (keys != null) {
      for (int i = 0; i < keys.length; ++i) {
        this.keys.add(new Integer(keys[i]));
      }
    }
    if (labels != null) {
      this.labels.addAll(Arrays.asList(labels));
    }
  
Methods Summary
public voidaccept(oracle.toplink.libraries.asm.CodeVisitor cv)

    int[] keys = new int[this.keys.size()];
    for (int i = 0; i < keys.length; ++i) {
      keys[i] = ((Integer)this.keys.get(i)).intValue();
    }
    Label[] labels = new Label[this.labels.size()];
    this.labels.toArray(labels);
    cv.visitLookupSwitchInsn(dflt, keys, labels);