private static CategoryMatchType getCategoryMatchType(CategoryPath categoryPath,
			String[] namespacePaths, boolean parentNamespacePreferred) {
		if (namespacePaths == null) {
			// root or unspecified namespace - prefer root category
			return categoryPath.isRoot() ? CategoryMatchType.PREFERRED
					: CategoryMatchType.SECONDARY;
		}

		String path = categoryPath.getPath();
		if (parentNamespacePreferred &&
			path.endsWith(namespacePaths[PARENT_NAMESPACE_PATH_INDEX])) {
			return CategoryMatchType.PREFERRED;
		}
		if (path.endsWith(namespacePaths[NAMESPACE_PATH_INDEX])) {
			return parentNamespacePreferred ? CategoryMatchType.SECONDARY
					: CategoryMatchType.PREFERRED;
		}
		return CategoryMatchType.NONE;
	}
Namespace category matcher.  
@param categoryPath datatype category path
@param namespacePaths namespace paths constraint or null for no namespace.  This value should
be obtained from the {@link #getRelativeCategoryPaths(Namespace)} method.
@param parentNamespacePreferred if true matching on parent namespace is 
enabled and preferred over match on actual namespace.  This is used for
class structure searching.
@return {@link CategoryMatchType#PREFERRED} is returned if parentNamespacePreferred is true 
and category path matches on parent-namespace or parentNamespacePreferred is false
and category path matches on namespace.  {@link CategoryMatchType#SECONDARY} is returned
if parentNamespacePreferred is true and category path matches on namespace.  Otherwise
{@link CategoryMatchType#NONE} is returned.
Ghidra/Framework/SoftwareModeling/src/main/java/ghidra/program/database/data/DataTypeUtilities.java