@Override
	synchronized void updateRefType(Address changeAddr, int opIndex, RefType refType)
			throws IOException {
		boolean updateRefLevel = false;
		byte newLevel = getRefLevel(refType);
		byte highestRefLevel = 0;
		if (!isFrom) {
			updateRefLevel = (newLevel != refLevel);
		}
		Reference[] result = new Reference[1];
		int pos = 0;
		int newPos = 0;
		for (int i = 0; i < numRefs; i++) {
			newPos = decode(refData, pos, result);
			Reference ref = result[0];
			if (ref.getOperandIndex() == opIndex) {
				Address addr = isFrom ? ref.getToAddress() : ref.getFromAddress();
				if (changeAddr.equals(addr)) {
					boolean isPrimary = ref.isPrimary();
					long symbolID = ref.getSymbolID();
					boolean isOffset = false;
					boolean isShifted = false;
					long offsetOrShift = 0;
					if (ref.isMemoryReference()) {
						isOffset = ((MemReferenceDB) ref).isOffset();
						isShifted = ((MemReferenceDB) ref).isShifted();
						offsetOrShift = ((MemReferenceDB) ref).getOffsetOrShift();
					}

					byte[] bytes =
						encode(ref.getFromAddress(), ref.getToAddress(), refType, ref.getSource(),
							ref.getOperandIndex(), symbolID, isPrimary, isOffset, isShifted,
							offsetOrShift);

					System.arraycopy(bytes, 0, refData, pos, bytes.length);

					if (updateRefLevel) {
						if (newLevel > refLevel) {
							highestRefLevel = newLevel;
							break;
						}
						if (newLevel > highestRefLevel) {
							highestRefLevel = newLevel;
						}
					}
					else {
						break;
					}
				}
			}
			else if (updateRefLevel) {
				byte level = getRefLevel(ref.getReferenceType());
				if (level > highestRefLevel) {
					highestRefLevel = level;
				}
			}
			pos = newPos;
		}
		if (updateRefLevel) {
			refLevel = highestRefLevel;
		}
		updateRecord();
	}
Construct reference list for existing record
@param rec existing refList record
@param adapter entry record storage adapter
@param addrMap address map for encoding/decoding addresses
@param program may be null for upgrade in which 
		case resulting reference objects are not suitable for general use.
@param cache RefList object cache
@param isFrom true for from-adapter use, false for to-adapter use
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/references/RefListV0.java