   @namespace: null
   @allNamespaces: {}
   @namespaces: []
-  @modules: []
-  @moduleNames: []
+  # @modules: []
+  # @moduleNames: []
+
+  @getName: ->
+    @_name || @name
+
+  @getInspectedObjects: ->
+    out = {}
+    for namespace in @namespaces
+      out[namespace.getName()] = namespace.getInspectedObjects()
+    for mod in @moduleNames
+      out[mod] = true
+    out
 
   # OUT: namespace
   @addNamespace: (name, namespace) ->

# global == self == window (if in browser)
if typeof global == 'object'
  # running in node.js
  global.self = global
else
  self.global ||= self

unless (->).name?


  @addModules: (map) ->
    @modules = [] unless @hasOwnProperty "modules"
    if @hasOwnProperty "moduleNames"
      console.log("NeptuneNamespaces: alread have moduleNames for #{@getName()}")
    else
      console.log("NeptuneNamespaces: create moduleNames for #{@getName()}")
      @moduleNames = []

    for name, module of map
      @moduleNames.push name
