private DataType getNamedDataType(String baseName, CategoryPath category)
			throws InvalidDataTypeException, CancelledException {

		List<DataType> results = new ArrayList<>();
		DataType dt = findDataType(sourceDataTypeManager, baseName, category, results);
		if (dt != null) {
			return dt; // found a direct match
		}

		//
		// We now either have no results or multiple results
		//
		if (results.isEmpty() && DataType.DEFAULT.getDisplayName().equals(baseName)) {
			dt = DataType.DEFAULT;
		}
		else if (category == null) {
			dt = findDataTypeInAllDataTypeManagers(baseName, results);
		}

		if (dt == null) {
			String msg = "Unrecognized data type of \"" + baseName + "\"";
			throw new InvalidDataTypeException(msg);
		}

		return dt.clone(destinationDataTypeManager);
	}
Throws exception if the data type does not match the specified {@link AllowedDataTypes}.

@param dt {@link DataType} to check
@param allowedTypes {@link AllowedDataTypes enum} specifying what category of data types are ok
@throws InvalidDataTypeException if dt violates the specified allowedTypes
Ghidra/Features/Base/src/main/java/ghidra/util/data/DataTypeParser.java