private void doCopy(Structure struct, DataTypeComponent[] definedComponents,
			DataType[] resolvedDts) throws IOException {

		// simple replication of struct - caller must perform record updates
		structLength = struct.isZeroLength() ? 0 : struct.getLength();
		numComponents = struct.getNumComponents();
		structAlignment = struct.getAlignment();

		DataTypeComponent[] otherComponents = struct.getDefinedComponents();
		for (int i = 0; i < otherComponents.length; i++) {
			DataTypeComponent dtc = otherComponents[i];
			DataType dt = resolvedDts[i]; // ancestry check already performed by caller
			DBRecord rec =
				componentAdapter.createRecord(dataMgr.getResolvedID(dt), key, dtc.getLength(),
					dtc.getOrdinal(), dtc.getOffset(), dtc.getFieldName(), dtc.getComment());
			dt.addParent(this);
			DataTypeComponentDB newDtc =
				new DataTypeComponentDB(dataMgr, componentAdapter, this, rec);
			components.add(newDtc);
		}
	}
Replaces the internal components of this structure with components of the given structure
including packing and alignment settings.

@param struct structure to be copied
@param notify provide notification if true
@throws DataTypeDependencyException if circular dependency detected
@throws IOException if database IO error occurs
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/StructureDB.java