class FileExportScriptInjector {

    static String buildNamespaceObject(final String namespace) {
        final int pkgSepIndex = namespace.lastIndexOf(NS_SEPARATOR);
        String raw = "";
        if (pkgSepIndex > 0) {
            final String nsPkg = namespace.substring(0,
                                                     pkgSepIndex);
            final String[] nsPkgObject = {"", ""};
            Arrays.asList(nsPkg.split("\\."))
                    .forEach(p -> {
                        nsPkgObject[0] += p;
                        nsPkgObject[1] += nsPkgObject[0] + " = " + nsPkgObject[0] + JS_OBJ_SUFFIX + "\n";
                        nsPkgObject[0] += NS_SEPARATOR;
                    });
            raw = nsPkgObject[1];
        }
        raw += namespace;
        return raw;
    }

    public  FileExportScriptInjector();
      FileExportScriptInjector(final Consumer<String> scriptInjector);

}