private DataTypeComponent doAdd(DataType dataType, int length, String name, String comment,
			boolean validateAlignAndNotify) throws DataTypeDependencyException {

		dataType = validateDataType(dataType);

		dataType = adjustBitField(dataType);

		if (validateAlignAndNotify) {
			dataType = resolve(dataType);
			checkAncestry(dataType);
		}

		length = getPreferredComponentLength(dataType, length);

		DataTypeComponentDB dtc = createComponent(dataMgr.getResolvedID(dataType), length,
			components.size(), 0, name, comment);
		dataType.addParent(this);

		components.add(dtc);

		return dtc;
	}
Constructor

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