private static void processAnonymous(DataType oldDataType, DataType newDataType,
			FileDataTypeManager oldFileArchive, FileDataTypeManager newFileArchive) {

		// If we have composites, then get any component with an anonymous data type in the
		// newDataType, and look for it by matching field name in the old composite.
		// If the composites are anonymous then look for matching components by ordinal
		// if the number of components matches.
		if (newDataType instanceof Composite && oldDataType instanceof Composite) {
			Composite newComposite = (Composite) newDataType;
			Composite oldComposite = (Composite) oldDataType;
			boolean isNewDtAnonymous = isAnonymousType(newDataType);
			boolean isOldDtAnonymous = isAnonymousType(oldDataType);
			if (isNewDtAnonymous && isOldDtAnonymous) {
				if (newComposite.getNumComponents() != oldComposite.getNumComponents()) {
					// Don't match anonymous components if the number of components
					// differs in anonymous composite data types.
					return;
				}
			}
			DataTypeComponent[] newComponents = newComposite.getComponents();
			for (DataTypeComponent newComp : newComponents) {
				transformAnonymousComponent(oldFileArchive, newFileArchive, oldComposite,
					newComposite, newComp);
			}
		}
		else if (newDataType instanceof TypeDef && oldDataType instanceof TypeDef) {
			// Is this a TypeDef on an anonymous?
			TypeDef oldTypeDef = (TypeDef) oldDataType;
			TypeDef newTypeDef = (TypeDef) newDataType;
			transformInnerAnonymousDataType(oldTypeDef.getDataType(), newTypeDef.getDataType(),
				oldFileArchive, newFileArchive);
		}
		else if (newDataType instanceof Pointer && oldDataType instanceof Pointer) {
			// Is this pointer to an anonymous?
			Pointer oldPointer = (Pointer) oldDataType;
			Pointer newPointer = (Pointer) newDataType;
			transformInnerAnonymousDataType(oldPointer.getDataType(), newPointer.getDataType(),
				oldFileArchive, newFileArchive);
		}
		else if (newDataType instanceof Array && oldDataType instanceof Array) {
			// Is this an array of anonymous?
			Array oldArray = (Array) oldDataType;
			Array newArray = (Array) newDataType;
			if (oldArray.getNumElements() == newArray.getNumElements()) {
				transformInnerAnonymousDataType(oldArray.getDataType(), newArray.getDataType(),
					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