private Symbol createSymbol(String name, SymbolType type, Address resultAddr,
			Namespace resultParentNs, Program srcPgm, long srcSymID, SourceType source)
			throws DuplicateNameException, InvalidInputException {
//		String comment = srcSymbol.getSymbolStringData();
		Symbol symbol = null;
		if (type == SymbolType.LABEL) {
			symbol = resultSymTab.createLabel(resultAddr, name, resultParentNs, source);
		}
		else if (type == SymbolType.CLASS) {
			GhidraClass newGhidraClass = resultSymTab.createClass(resultParentNs, name, source);
			symbol = newGhidraClass.getSymbol();
		}
		else if (type == SymbolType.NAMESPACE) {
			Namespace newNamespace = resultSymTab.createNameSpace(resultParentNs, name, source);
			symbol = newNamespace.getSymbol();
		}
		else if (type == SymbolType.LIBRARY) {
			ExternalManager srcExtMgr = srcPgm.getExternalManager();
			String path = srcExtMgr.getExternalLibraryPath(name);

			ExternalManagerDB extMgr = (ExternalManagerDB) resultPgm.getExternalManager();
			extMgr.setExternalPath(name, path, (source == SourceType.USER_DEFINED));
			symbol = resultSymTab.getLibrarySymbol(name);
		}
		if (symbol != null) {
//			symbol.setSymbolStringData(comment);
			if (symbol.getParentNamespace().equals(resultParentNs)) {
				long resolveSymID = symbol.getID();
				updateResolveIDs(srcPgm, srcSymID, resolveSymID);
			}
		}
		return symbol;
	}
Gets an array of strings indicating what the full path  would be if a symbol with
the indicated name were in the specified namespace.
@param name the symbol name
@param namespace the namespace
@return the path as an array
Ghidra/Features/Base/src/main/java/ghidra/app/merge/listing/SymbolMerger.java