-redef class MMethodDef
-
- # FIXME annotation should be handled in their own way
- redef fun html_modifiers do
- if mproperty.is_init then
- var res = new Array[String]
- if mproperty.visibility != public_visibility then
- res.add mproperty.visibility.to_s
- end
- return res
- end
- var res = super
- if is_abstract then
- res.add "abstract"
- else if is_intern then
- res.add "intern"
- end
- res.add "fun"
- return res
- end
-
- redef fun html_declaration do
- if mproperty.is_init then
- var tpl = new Template
- tpl.add "<span>"
- tpl.add html_modifiers.join(" ")
- tpl.add " "
- tpl.add html_link
- tpl.add html_signature
- tpl.add "</span>"
- return tpl
- end
- return super
- end
-
- redef fun html_short_signature do
- if mproperty.is_root_init and new_msignature != null then
- return new_msignature.html_short_signature
- end
- return msignature.html_short_signature
- end
-
- redef fun html_signature do
- if mproperty.is_root_init and new_msignature != null then
- return new_msignature.html_signature
- end
- return msignature.html_signature
- end
-end
-
-redef class MVirtualTypeProp
- redef fun html_link do return mvirtualtype.html_link
-end
-
-redef class MVirtualTypeDef
-
- redef fun html_modifiers do
- var res = super
- res.add "type"
- return res
- end
-
- redef fun html_short_signature do return new Template
-
- redef fun html_signature do
- var tpl = new Template
- if bound == null then return tpl
- tpl.add ": "
- tpl.add bound.html_signature
- return tpl
- end
-end
-
-redef class MType
- # Returns the signature of this type whithout bounds.
- fun html_short_signature: Template is abstract
-
- # Returns the signature of this type.
- fun html_signature: Template is abstract
-end
-
-redef class MClassType
- redef fun html_link do return mclass.html_link
- redef fun html_short_signature do return html_link
- redef fun html_signature do return html_link
-end
-
-redef class MNullableType
-
- redef fun html_short_signature do
- var tpl = new Template
- tpl.add "nullable "
- tpl.add mtype.html_short_signature
- return tpl
- end
-
- redef fun html_signature do
- var tpl = new Template
- tpl.add "nullable "
- tpl.add mtype.html_signature
- return tpl
- end
-end
-
-redef class MGenericType
- redef fun html_short_signature do
- var lnk = html_link
- var tpl = new Template
- tpl.add new Link.with_title(lnk.href, mclass.name.html_escape, lnk.title)
- tpl.add "["
- for i in [0..arguments.length[ do
- tpl.add arguments[i].html_short_signature
- if i < arguments.length - 1 then tpl.add ", "
- end
- tpl.add "]"
- return tpl
- end
-
- redef fun html_signature do
- var lnk = html_link
- var tpl = new Template
- tpl.add new Link.with_title(lnk.href, mclass.name.html_escape, lnk.title)
- tpl.add "["
- for i in [0..arguments.length[ do
- tpl.add arguments[i].html_signature
- if i < arguments.length - 1 then tpl.add ", "
- end
- tpl.add "]"
- return tpl
- end
-end
-