public static String[] getNamespaces(final String namespaceName)
    {
        if ("true".equals(System.getProperty(SbeTool.CPP_NAMESPACES_COLLAPSE)))
        {
            return new String[]{ namespaceName.replace(".", "_") };
        }
        else
        {
            return Pattern.compile("\\.").split(namespaceName);
        }
    }
Construct an array of namespace strings based on the supplied namespaceName,
accounting for the CPP_NAMESPACES_COLLAPSE option.

@param namespaceName a namespace name that may contain period-separated nested namespaces
@return an array of nested namespace strings
sbe-tool/src/main/java/uk/co/real_logic/sbe/ir/Ir.java