private static void transformAnonymousComponent(FileDataTypeManager oldFileArchive,
			FileDataTypeManager newFileArchive, Composite oldComposite, Composite newComposite,
			DataTypeComponent newComponent) {

		DataType newCompDt = newComponent.getDataType();
		int anonymousPointerDepth = getAnonymousPointerDepth(newCompDt);
		int anonymousArrayNumElements = getAnonymousArrayElementCount(newCompDt);
		int anonymousTypeDefDepth = getAnonymousTypeDefDepth(newCompDt);

		if (isAnonymousType(newCompDt) || anonymousPointerDepth > 0 ||
			anonymousArrayNumElements > 0 || anonymousTypeDefDepth > 0) {

			// Found an anonymous type, anonymous pointer, or anonymous array,
			// so get the matching component by field name or ordinal.
			DataTypeComponent matchingComponent =
				getAnonymousMatch(oldComposite, newComposite, newComponent);

			if (matchingComponent != null) {
				DataType oldCompDt = matchingComponent.getDataType();
				// Pointer
				if (anonymousPointerDepth > 0) {
					int oldPointerDepth = getAnonymousPointerDepth(oldCompDt);
					if (anonymousPointerDepth != oldPointerDepth) {
						return; // No match for anonymous pointer.
					}
					// Get each anonymous type rather than the pointer.
					newCompDt = DataTypeUtilities.getBaseDataType(newCompDt);
					oldCompDt = DataTypeUtilities.getBaseDataType(oldCompDt);
				}
				// Array
				if (anonymousArrayNumElements > 0) {
					int oldArrayNumElements = getAnonymousArrayElementCount(oldCompDt);
					if (anonymousArrayNumElements != oldArrayNumElements) {
						return; // No match for anonymous array.
					}
					// Get each anonymous type rather than the array.
					newCompDt = DataTypeUtilities.getBaseDataType(newCompDt);
					oldCompDt = DataTypeUtilities.getBaseDataType(oldCompDt);
				}
				// TypeDef
				if (anonymousTypeDefDepth > 0) {
					int oldTypeDefDepth = getAnonymousTypeDefDepth(oldCompDt);
					if (anonymousTypeDefDepth != oldTypeDefDepth) {
						return; // No match for anonymous type definition.
					}
					// Get each anonymous type rather than the typedef.
					newCompDt = DataTypeUtilities.getBaseDataType(newCompDt);
					oldCompDt = DataTypeUtilities.getBaseDataType(oldCompDt);
				}

				if (areSameClassType(newCompDt, oldCompDt) && isAnonymousType(oldCompDt)) {
					// Got a match so set the ID.
					transformDataType(newCompDt, newFileArchive, oldCompDt);

					// Now process children anonymous data types for anonymous composites.
					processAnonymous(oldCompDt, newCompDt, oldFileArchive, newFileArchive);
				}
			}
		}
	}
DataTypeArchiveTransformer changes (transforms) a new archive file so that it appears to be
an updated copy of a previously existing data type archive. This allows us to parse a new
version of each standard GDT file we supply. This class changes the IDs on the data types
so they will match the previous version's IDs. This allows the new data type archive and
its data types to become the associated data types where the previous version data types
were applied.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeArchiveTransformer.java