@Override
	public void dataTypeReplaced(DataType oldDt, DataType newDt) {
		if (newDt == this || (newDt instanceof Dynamic) || (newDt instanceof FactoryDataType)) {
			newDt = DataType.DEFAULT;
		}
		lock.acquire();
		try {
			if (checkIsValid() && getDataType() == oldDt) {
				settingsDef = null;
				defaultSettings = null;
				oldDt.removeParent(this);
				newDt = resolve(newDt);
				newDt.addParent(this);
				record.setLongValue(TypedefDBAdapter.TYPEDEF_DT_ID_COL,
					dataMgr.getResolvedID(newDt));
				try {
					adapter.updateRecord(record, true);
				}
				catch (IOException e) {
					dataMgr.dbError(e);
				}
				if (oldDt.getLength() != newDt.getLength()) {
					notifySizeChanged(false);
				}
				else if (oldDt.getAlignment() != newDt.getAlignment()) {
					notifyAlignmentChanged(false);
				}
				else {
					dataMgr.dataTypeChanged(this, false);
				}
			}
		}
		finally {
			lock.release();
		}
	}
Construct TypeDefDB instance
@param dataMgr datatype manager
@param cache DataTypeDB cache
@param adapter TypeDef record adapter
@param record TypeDefDB record
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/TypedefDB.java