@Override
	public DataTypeComponent insert(int ordinal, DataType dataType, int length, String name,
			String comment) throws IllegalArgumentException {
		lock.acquire();
		try {
			checkDeleted();
			dataType = validateDataType(dataType);

			dataType = adjustBitField(dataType);

			dataType = resolve(dataType);
			checkAncestry(dataType);

			getComputedAlignment(true); // ensure previous alignment has been stored

			length = getPreferredComponentLength(dataType, length);

			DataTypeComponentDB dtc =
				createComponent(dataMgr.getResolvedID(dataType), length, ordinal, 0, name, comment);
			dataType.addParent(this);
			shiftOrdinals(ordinal, 1);
			components.add(ordinal, dtc);

			if (!repack(false, true)) {
				dataMgr.dataTypeChanged(this, false);
			}
			return dtc;
		}
		catch (DataTypeDependencyException e) {
			throw new IllegalArgumentException(e.getMessage(), e);
		}
		finally {
			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