@Override
	public boolean repack(boolean notify) {

		int oldLength = unionLength;
		int oldAlignment = getAlignment();

		unionLength = 0;
		for (DataTypeComponent dtc : components) {
			// TODO: compute alignment in this loop
			int length = dtc.getLength();
			if (isPackingEnabled() && dtc.isBitFieldComponent()) {
				// revise length to reflect compiler bitfield allocation rules
				length = getBitFieldAllocation((BitFieldDataType) dtc.getDataType());
			}
			unionLength = Math.max(length, unionLength);
		}

		unionAlignment = -1; // force recompute of unionAlignment
		getAlignment();

		if (isPackingEnabled()) {
			unionLength = DataOrganizationImpl.getAlignedOffset(unionAlignment, unionLength);
		}

		boolean changed = (oldLength != unionLength) || (oldAlignment != unionAlignment);

		if (changed && notify) {
			if (oldLength != unionLength) {
				notifySizeChanged();
			}
			else if (oldAlignment != unionAlignment) {
				notifyAlignmentChanged();
			}
		}
		return changed;
	}
Construct a new UnionDataType.
NOTE: A constructor form which accepts a {@link DataTypeManager} should be used when possible
since there may be performance benefits during datatype resolution.
@param name the name of this dataType
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/model/data/UnionDataType.java