static String getMessageName(StringBuilder sb, Class<?> type,
			boolean includeScope) {

		// Crosstown does not support complex generated names since they won't
		// translate to
		// dotNet
		if (includeScope) {
			String scope = null;
			if (ExternallyNamespaced.class.isAssignableFrom(type)) {
				// Use dotNet Namespaces

				try {
					scope = ((ExternallyNamespaced) type.newInstance())
							.getExternalNamespace();
				} catch (Exception e) {
					_log.error(
							"Unable to obtain namespace for "
									+ type
									+ ".  ExternallyNamespaced classes must have a default constructor.",
							e);
				}
			} else {
				// Use Java Packages
				scope = type.getPackage().getName();
			}
			if (scope != null && !scope.isEmpty()) {
				sb.append(scope);
				sb.append(":");
			}
		}

		sb.append(type.getSimpleName());

		return sb.toString();

	}