@Override
	public void replaceWith(DataType dataType) {
		if (!(dataType instanceof UnionInternal)) {
			throw new IllegalArgumentException();
		}
		lock.acquire();
		boolean isResolveCacheOwner = dataMgr.activateResolveCache();
		try {
			checkDeleted();
			doReplaceWith((UnionInternal) dataType, true);
		}
		catch (DataTypeDependencyException e) {
			throw new IllegalArgumentException(e.getMessage(), e);
		}
		catch (IOException e) {
			dataMgr.dbError(e);
		}
		finally {
			if (isResolveCacheOwner) {
				dataMgr.processResolveQueue(true);
			}
			lock.release();
		}
	}
Constructor

@param dataMgr
@param cache
@param compositeAdapter
@param componentAdapter
@param record
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/UnionDB.java