package ch.usi.inf.sp.cfg.builder; import org.objectweb.asm.tree.AbstractInsnNode; import org.objectweb.asm.tree.LabelNode; import org.objectweb.asm.tree.LookupSwitchInsnNode; public class LookupSwitchInstructionNodeInfo implements SwitchInstructionNodeInfo { private final LookupSwitchInsnNode node; public LookupSwitchInstructionNodeInfo(LookupSwitchInsnNode node) { this.node = node; } @Override public AbstractInsnNode getNode() { return node; } @Override public int getCaseCount() { return node.labels.size(); } @Override public LabelNode getLabelForCase(int index) { return node.labels.get(index); } @Override public String getKeyForCase(int index) { return Integer.toString(node.keys.get(index)); } @Override public LabelNode getDefaultCase() { return node.dflt; } }