private static void validate(File oldFile, File newFile, File destinationFile)
			throws InvalidInputException {

		if (oldFile == null || oldFile.getPath().length() == 0) {
			throw new InvalidInputException("Old data type archive file must be specified.");
		}
		if (newFile == null || newFile.getPath().length() == 0) {
			throw new InvalidInputException("New data type archive file must be specified.");
		}
		if (destinationFile == null || destinationFile.getPath().length() == 0) {
			throw new InvalidInputException(
				"Destination data type archive file must be specified.");
		}

		if (!oldFile.getPath().endsWith(FileDataTypeManager.SUFFIX)) {
			throw new InvalidInputException("Old data type archive file must end with .gdt");
		}
		if (!newFile.getPath().endsWith(FileDataTypeManager.SUFFIX)) {
			throw new InvalidInputException("New data type archive file must end with .gdt");
		}
		if (!destinationFile.getPath().endsWith(FileDataTypeManager.SUFFIX)) {
			throw new InvalidInputException(
				"Destination data type archive file must end with .gdt");
		}

		if (!oldFile.exists()) {
			throw new InvalidInputException("Old data type archive file must already exist.");
		}
		if (!newFile.exists()) {
			throw new InvalidInputException("New data type archive file must already exist.");
		}

		if (!oldFile.isFile()) {
			throw new InvalidInputException("Old data type archive file must be a file.");
		}
		if (!newFile.isFile()) {
			throw new InvalidInputException("New data type archive file must be a file.");
		}

		if (oldFile.length() == 0) {
			throw new InvalidInputException("Old data type archive file cannot be empty.");
		}
		if (newFile.length() == 0) {
			throw new InvalidInputException("New data type archive file cannot be empty.");
		}

		if (destinationFile.exists()) {
			throw new InvalidInputException("Destination file \"" +
				destinationFile.getAbsolutePath() + "\" cannot already exist.");
		}

	}
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