code: function RestListMetadata(list, listMeta) {
      var pool = {};
  
      var profiles = Object.getOwnPropertyNames(listMeta);
      while (profiles.length) {
          var p = profiles.shift();
  
          if (p == "isAdmin") {
              utils.deprecated("Profile 'isAdmin' is deprecated, please use 'admin' instead. Admin access to resource " + list.key + " is disabled.");
          }
          var meta = listMeta[p];
          var metaBase;
  
          // check for circular inheritance or non-existing.
          if (meta.hasOwnProperty('__extends__')) {
              var metaBaseName = meta["__extends__"];
              if (! pool.hasOwnProperty(metaBaseName)) {
                  if (listMeta.hasOwnProperty(metaBaseName)) {
                      var checkCircular = listMeta[metaBaseName]['__extends__'] || undefined;
                      if (checkCircular == p) {
                          throw new Error("Circular inheritance for RestListMetadata profiles " + p + " & " + metaBaseName + " in Model " + list.key + ".")
                      }
                      profiles.push(p);
                      continue;
                  }
                  else {
                      throw new Error("RestListMetadata profile " + p + " extends a non-existing profile " + metaBaseName + " in Model " + list.key + ".")
                  }
              }
              // were ok, set inheritance.
              delete meta["__extends__"];
              metaBase =  _.extend({}, pool[metaBaseName]);
          }
          pool[p] = compile_meta_module(list, meta, metaBase || defaultConfig(list))
  
      }
  
      this.fieldsByTypes = groupFieldsByType(list);
      this.pool = pool;
  }
docs: Represents metadata about a list object in the rest domain.
  This class "compiles" a list metadata module into a single object and supports profile selection. (e.g: admin..)
  @param list
  @param listMeta
  @constructor