int baseCodeAddress = methodDef.getSparseSwitchBaseAddress(codeAddress);
targets = new ArrayList<SparseSwitchTarget>();
if (baseCodeAddress >= 0) {
for (SwitchElement switchElement: instruction.getSwitchElements()) {
LabelMethodItem label = methodDef.getLabelCache().internLabel(
new LabelMethodItem( methodDef.classDef.options, baseCodeAddress + switchElement.getOffset(),
"sswitch_"));
targets.add(new SparseSwitchLabelTarget(switchElement.getKey(), label));
}
} else {
//if we couldn't determine a base address, just use relative offsets rather than labels