+ # The namespace used for entities according to their visibility `v`.
+ #
+ # Public entities use only the project as a namespace.
+ # Private entities use the `full_name` (i.e. "project::module")
+ #
+ # This method is used by entities to implement their `full_name`.
+ fun namespace_for(v: MVisibility): String do
+ if v <= private_visibility then return full_name
+ var mgroup = self.mgroup
+ if mgroup == null then
+ return full_name
+ else
+ return mgroup.mproject.full_name
+ end
+ end
+