- redef meth need_doc(dctx) do return true
- redef meth prototype_head(dctx) do return "module "
-
- attr _known_owner_of_cache: Map[MMModule, MMModule] = new HashMap[MMModule, MMModule]
- meth known_owner_of(module: MMModule): MMModule
- do
- if _known_owner_of_cache.has_key(module) then return _known_owner_of_cache[module]
- var res = module
- if mhe < module and visibility_for(module) != 0 then
- res = known_owner_of_intern(module, self, false)
+ redef fun need_doc(dctx) do return true
+ redef fun prototype_head(dctx) do return "module "
+
+ var _known_owner_of_cache: Map[MMModule, MMModule] = new HashMap[MMModule, MMModule]
+
+ # Return the owner of `module` from the point of view of `self`
+ fun known_owner_of(mod: MMModule): MMModule
+ do
+ if _known_owner_of_cache.has_key(mod) then return _known_owner_of_cache[mod]
+ var res = mod
+ # is module is publicly imported by self?
+ if mhe < mod and visibility_for(mod) != 0 then
+ res = known_owner_of_intern(mod, self, false)