redef fun entity: Entity do return compound
redef fun start_dox_element(local_name: String, atts: Attributes) do
- if ["compoundname", "innerclass", "innernamespace"].has(local_name) then
+ if "compoundname" == local_name then
text.listen_until(dox_uri, local_name)
- if ["innerclass", "innernamespace"].has(local_name) then
- refid = get_required(atts, "refid")
- end
- else if "basecompoundref" == local_name then
- refid = get_optional(atts, "refid", "")
+ else if ["innerclass", "innernamespace", "basecompoundref"].has(local_name) then
prot = get_optional(atts, "prot", "")
- virt = get_optional(atts, "virt", "")
text.listen_until(dox_uri, local_name)
+ if "basecompoundref" == local_name then
+ refid = get_optional(atts, "refid", "")
+ virt = get_optional(atts, "virt", "")
+ else
+ refid = get_required(atts, "refid")
+ end
else if "memberdef" == local_name then
read_member(atts)
else if local_name == "sectiondef" then
if local_name == "compoundname" then
compound.full_name = text.to_s
else if local_name == "innerclass" then
- compound.declare_class(refid, text.to_s)
+ compound.declare_class(refid, text.to_s, prot)
else if local_name == "innernamespace" then
compound.declare_namespace(refid, text.to_s)
else if "memberdef" == local_name then
#
# * `id`: `model_id` of the inner class.
# * `full_name`: qualified name of the inner class. Ignored in practice.
+ # * `prot`: visibility (proctection).
#
# TODO: Handle cases where only the `full_name` is available.
- fun declare_class(id: String, full_name: String) do end
+ fun declare_class(id: String, full_name: String, prot: String) do end
# Declare a base compound (usually, a base class).
#
inner_namespaces.add new NamespaceRef(id, full_name)
end
- redef fun declare_class(id: String, full_name: String) do
+ redef fun declare_class(id: String, full_name: String, prot: String) do
graph.class_to_ns[id] = self
end
file.full_name = "Bar.java"
file.model_id = "_Bar_8java"
-file.declare_class("classa_b_bar", "a::b::Bar")
-file.declare_class("classbaz", "Baz")
+file.declare_class("classa_b_bar", "a::b::Bar", "package")
+file.declare_class("classbaz", "Baz", "")
file.declare_namespace("", "a::b")
file.put_in_graph
a_ns.put_in_graph
b_ns.full_name = "a::b"
-b_ns.declare_class("classa_b_bar", "")
+b_ns.declare_class("classa_b_bar", "", "")
b_ns.put_in_graph
c_ns.model_id = "namespacec"