case ReferenceType.STRING:
return stringSection.getItemIndex((StringRef)referenceInstruction.getReference());
case ReferenceType.TYPE:
return typeSection.getItemIndex((TypeRef)referenceInstruction.getReference());
default:
throw new ExceptionWithContext("Unknown reference type: %d",
referenceInstruction.getOpcode().referenceType);
}
}