private static <T extends DataType> T getAssignableDataType(DataTypeManager dataTypeManager,
			CategoryPath rootPath, List<String> namespacePath, String dtName,
			Class<? extends DataType> classConstraint) {

		Category category = dataTypeManager.getCategory(rootPath);
		if (category == null) {
			return null;
		}

		if (namespacePath == null || namespacePath.isEmpty()) {
			return getAssignableDataType(category, dtName, classConstraint);
		}

		CategoryPath categoryPath = new CategoryPath(rootPath, namespacePath);
		category = dataTypeManager.getCategory(categoryPath);
		if (category == null) {
			return null;
		}
		return getAssignableDataType(category, dtName, classConstraint);
	}
Get the specified datatype by full path and return only if its type corresponds to class
constraint if specified.
@param <T> A standard interface which extends {@link DataType} (e.g., {@link Structure}).
@param dataTypeManager datatype manager to query
@param rootPath root category path
@param namespacePath an optional namespace path to be checked under rootPath.  
If null or empty the rootPath will be checked for dtName.
@param dtName datatype name
@param classConstraint datatype class constraint (optional, may be null)
@return datatype which corresponds to specified path or null if not found
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeUtilities.java