A definition of a property (local property)

Unlike MProperty, a MPropDef is a local definition that belong to a specific class definition (which belong to a specific module)

Introduced properties

type MPROPDEF: MPropDef

nitc :: MPropDef :: MPROPDEF

Self class
type MPROPERTY: MProperty

nitc :: MPropDef :: MPROPERTY

The associated MProperty subclass.
private var _c_name: String

nitc :: MPropDef :: _c_name

private var _full_name: String

nitc :: MPropDef :: _full_name

The full-name of mpropdefs combine the information about the classdef and the mproperty.
private var _has_contract: Bool

nitc :: MPropDef :: _has_contract

flag to indicate is the MPropDef has a contract
private var _has_supercall: Bool

nitc :: MPropDef :: _has_supercall

Does the MPropDef contains a call to super or a call of a super-constructor?
private var _html_url: String

nitc :: MPropDef :: _html_url

private var _is_after: Bool

nitc :: MPropDef :: _is_after

Does self have the after annotation?
private var _is_after: Bool

nitc :: MPropDef :: _is_after

private var _is_after_all: Bool

nitc :: MPropDef :: _is_after_all

Does self have the after_all annotation?
private var _is_before: Bool

nitc :: MPropDef :: _is_before

private var _is_before: Bool

nitc :: MPropDef :: _is_before

Does self have the before annotation?
private var _is_before_all: Bool

nitc :: MPropDef :: _is_before_all

Does self have the before_all annotation?
private var _is_test: Bool

nitc :: MPropDef :: _is_test

private var _location: Location

nitc :: MPropDef :: _location

private var _mclassdef: MClassDef

nitc :: MPropDef :: _mclassdef

The class definition where the property definition is
private var _mproperty: MPROPERTY

nitc :: MPropDef :: _mproperty

The associated global property
private var _to_s: String

nitc :: MPropDef :: _to_s

Internal name combining the module, the class and the property
protected fun c_name=(c_name: String)

nitc :: MPropDef :: c_name=

init defaultinit(mclassdef: MClassDef, mproperty: MPROPERTY, location: Location)

nitc :: MPropDef :: defaultinit

protected fun full_name=(full_name: String)

nitc :: MPropDef :: full_name=

The full-name of mpropdefs combine the information about the classdef and the mproperty.
fun has_contract: Bool

nitc :: MPropDef :: has_contract

flag to indicate is the MPropDef has a contract
protected fun has_contract=(has_contract: Bool)

nitc :: MPropDef :: has_contract=

flag to indicate is the MPropDef has a contract
fun has_supercall: Bool

nitc :: MPropDef :: has_supercall

Does the MPropDef contains a call to super or a call of a super-constructor?
fun has_supercall=(has_supercall: Bool)

nitc :: MPropDef :: has_supercall=

Does the MPropDef contains a call to super or a call of a super-constructor?
fun is_after: Bool

nitc :: MPropDef :: is_after

Does self have the after annotation?
fun is_after=(is_after: Bool)

nitc :: MPropDef :: is_after=

Does self have the after annotation?
fun is_after_all: Bool

nitc :: MPropDef :: is_after_all

Does self have the after_all annotation?
fun is_after_all=(is_after_all: Bool)

nitc :: MPropDef :: is_after_all=

Does self have the after_all annotation?
fun is_before: Bool

nitc :: MPropDef :: is_before

Does self have the before annotation?
fun is_before=(is_before: Bool)

nitc :: MPropDef :: is_before=

Does self have the before annotation?
fun is_before_all: Bool

nitc :: MPropDef :: is_before_all

Does self have the before_all annotation?
fun is_before_all=(is_before_all: Bool)

nitc :: MPropDef :: is_before_all=

Does self have the before_all annotation?
fun is_intro: Bool

nitc :: MPropDef :: is_intro

Is self the definition that introduce the property?
protected fun location=(location: Location)

nitc :: MPropDef :: location=

fun lookup_next_definition(mmodule: MModule, mtype: MType): MPROPDEF

nitc :: MPropDef :: lookup_next_definition

Return the next definition in linearization of mtype.
fun mclassdef: MClassDef

nitc :: MPropDef :: mclassdef

The class definition where the property definition is
protected fun mclassdef=(mclassdef: MClassDef)

nitc :: MPropDef :: mclassdef=

The class definition where the property definition is
fun mproperty: MPROPERTY

nitc :: MPropDef :: mproperty

The associated global property
protected fun mproperty=(mproperty: MPROPERTY)

nitc :: MPropDef :: mproperty=

The associated global property
protected fun nitdoc_breadcrumbs=(nitdoc_breadcrumbs: Array[MEntity])

nitc :: MPropDef :: nitdoc_breadcrumbs=

protected fun to_s=(to_s: String)

nitc :: MPropDef :: to_s=

Internal name combining the module, the class and the property

Redefined properties

redef type SELF: MPropDef

nitc $ MPropDef :: SELF

Type of this instance, automatically specialized in every class
redef fun c_name: String

nitc $ MPropDef :: c_name

A fully-qualified C-like identifier of this model entity.
redef fun collect_children(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: model_collect $ MPropDef :: collect_children

Collect all children definitions that directly depend on self
redef fun collect_linearization(mainmodule: MModule): nullable Array[MEntity]

nitc :: model_collect $ MPropDef :: collect_linearization

Collect self linearization anchored on mainmodule
redef fun collect_modifiers: Array[String]

nitc :: model_collect $ MPropDef :: collect_modifiers

Collect modifier keywords like redef, private etc
redef fun collect_parents(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: model_collect $ MPropDef :: collect_parents

Collect only the next definition of self
redef fun core_serialize_to(v: Serializer)

nitc :: json_model $ MPropDef :: core_serialize_to

Actual serialization of self to serializer
redef abstract fun create_ast_representation(astbuilder: nullable ASTBuilder): APropdef

nitc :: astbuilder $ MPropDef :: create_ast_representation

Build a ANode from self
redef fun cs_icon(no_color: nullable Bool): String

nitc :: term_model $ MPropDef :: cs_icon

Text icon to be displayed in front of the entity
redef fun css_classes: Array[String]

nitc :: html_model $ MPropDef :: css_classes

CSS classes used to decorate self
redef fun full_name: String

nitc $ MPropDef :: full_name

The full-name of mpropdefs combine the information about the classdef and the mproperty.
redef fun href(v: NitlightVisitor): nullable String

nitc :: nitlight $ MPropDef :: href

redef fun html_icon: BSIcon

nitc :: html_model $ MPropDef :: html_icon

An icon representative of the mentity
redef fun html_namespace: Template

nitc :: html_model $ MPropDef :: html_namespace

Returns full_name decorated with HTML links
redef fun html_url: String

nitc :: static_html $ MPropDef :: html_url

The MEntity URL in the HTML output
redef fun html_url=(html_url: String)

nitc :: static_html $ MPropDef :: html_url=

The MEntity URL in the HTML output
redef fun infobox(v: HtmlightVisitor): HInfoBox

nitc :: htmlight $ MPropDef :: infobox

An new infobox documenting the entity
redef init init

nitc $ MPropDef :: init

redef fun is_after: Bool

nitc :: parse_annotations $ MPropDef :: is_after

Does self have the after annotation?
redef fun is_after=(is_after: Bool)

nitc :: parse_annotations $ MPropDef :: is_after=

Does self have the after annotation?
redef fun is_after_all: Bool

nitc :: parse_annotations $ MPropDef :: is_after_all

Does self have the after_all annotation?
redef fun is_after_all=(is_after_all: Bool)

nitc :: parse_annotations $ MPropDef :: is_after_all=

Does self have the after_all annotation?
redef fun is_before: Bool

nitc :: parse_annotations $ MPropDef :: is_before

Does self have the before annotation?
redef fun is_before=(is_before: Bool)

nitc :: parse_annotations $ MPropDef :: is_before=

Does self have the before annotation?
redef fun is_before_all: Bool

nitc :: parse_annotations $ MPropDef :: is_before_all

Does self have the before_all annotation?
redef fun is_before_all=(is_before_all: Bool)

nitc :: parse_annotations $ MPropDef :: is_before_all=

Does self have the before_all annotation?
redef fun is_test: Bool

nitc :: parse_annotations $ MPropDef :: is_test

Is self created for unit testing purpose?
redef fun is_test=(is_test: Bool)

nitc :: parse_annotations $ MPropDef :: is_test=

Is self created for unit testing purpose?
redef fun json_namespace: JsonNamespace

nitc :: json_model $ MPropDef :: json_namespace

Return self.full_name as an object that can be serialized to json.
redef fun location: Location

nitc $ MPropDef :: location

The origin of the definition.
redef fun mdoc_or_fallback: nullable MDoc

nitc $ MPropDef :: mdoc_or_fallback

The documentation associated to the entity or their main nested entity.
redef fun mentity_kind_rank: Int

nitc :: model_index $ MPropDef :: mentity_kind_rank

Compare MEntity class kind
redef fun model: Model

nitc $ MPropDef :: model

A Model Entity has a direct link to its model
redef fun name: String

nitc $ MPropDef :: name

Actually the name of the mproperty
redef fun nitdoc_breadcrumbs: Array[MEntity]

nitc :: static_base $ MPropDef :: nitdoc_breadcrumbs

MEntities composing the breadcrumbs of a nitdoc page
redef fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: neo $ MPropDef :: to_node

Build a NeoNode representing self.
redef fun to_s: String

nitc $ MPropDef :: to_s

Internal name combining the module, the class and the property
redef fun visibility: MVisibility

nitc $ MPropDef :: visibility

The visibility of the MEntity.
redef fun web_url: String

nitc :: api_base $ MPropDef :: web_url

URL to self within the web interface.

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type MENTITY: SELF

nitc :: MEntity :: MENTITY

FIXME used to bypass RTA limitation on type resolution
type MPROPDEF: MPropDef

nitc :: MPropDef :: MPROPDEF

Self class
type MPROPERTY: MProperty

nitc :: MPropDef :: MPROPERTY

The associated MProperty subclass.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _annotations: Set[String]

nitc :: AnnotatedMEntity :: _annotations

Names of the annotations found on self declaration
private var _c_name: String

nitc :: MPropDef :: _c_name

private var _css_classes: Array[String]

nitc :: MEntity :: _css_classes

CSS classes used to decorate self
private var _deprecation: nullable MDeprecationInfo

nitc :: MEntity :: _deprecation

Is the entity deprecated?
private var _examples: Array[MExample]

nitc :: MEntity :: _examples

Examples found for self
private var _full_name: String

nitc :: MPropDef :: _full_name

The full-name of mpropdefs combine the information about the classdef and the mproperty.
private var _has_contract: Bool

nitc :: MPropDef :: _has_contract

flag to indicate is the MPropDef has a contract
private var _has_supercall: Bool

nitc :: MPropDef :: _has_supercall

Does the MPropDef contains a call to super or a call of a super-constructor?
private var _html_full_name: String

nitc :: MEntity :: _html_full_name

The MEntity full_name escaped for HTML
private var _html_id: String

nitc :: MEntity :: _html_id

The MEntity unique ID in the HTML output
private var _html_name: String

nitc :: MEntity :: _html_name

The MEntity name escaped for HTML
private var _html_url: String

nitc :: MEntity :: _html_url

The MEntity URL in the HTML output
private var _html_url: String

nitc :: MEntity :: _html_url

private var _html_url: String

nitc :: MPropDef :: _html_url

private var _is_after: Bool

nitc :: MPropDef :: _is_after

Does self have the after annotation?
private var _is_after: Bool

nitc :: MPropDef :: _is_after

private var _is_after_all: Bool

nitc :: MPropDef :: _is_after_all

Does self have the after_all annotation?
private var _is_before: Bool

nitc :: MPropDef :: _is_before

private var _is_before: Bool

nitc :: MPropDef :: _is_before

Does self have the before annotation?
private var _is_before_all: Bool

nitc :: MPropDef :: _is_before_all

Does self have the before_all annotation?
private var _is_broken: Bool

nitc :: MEntity :: _is_broken

The indication that the entity did not pass some semantic verifications.
private var _is_fictive: Bool

nitc :: MEntity :: _is_fictive

Is self created for internal purpose?
private var _is_test: Bool

nitc :: MPropDef :: _is_test

private var _is_test: Bool

nitc :: MEntity :: _is_test

Is self created for unit testing purpose?
private var _location: Location

nitc :: MPropDef :: _location

private var _mclassdef: MClassDef

nitc :: MPropDef :: _mclassdef

The class definition where the property definition is
private var _mdoc: nullable MDoc

nitc :: MEntity :: _mdoc

The documentation associated to the entity
private var _mexample: nullable MExample

nitc :: MEntity :: _mexample

Return this entity as a MExample
private var _mproperty: MPROPERTY

nitc :: MPropDef :: _mproperty

The associated global property
private var _to_s: String

nitc :: MPropDef :: _to_s

Internal name combining the module, the class and the property
protected fun accept_json_serializer(v: JsonSerializer)

serialization :: Serializable :: accept_json_serializer

Refinable service to customize the serialization of this class to JSON
protected fun accept_msgpack_attribute_counter(v: AttributeCounter)

serialization :: Serializable :: accept_msgpack_attribute_counter

Hook to customize the behavior of the AttributeCounter
protected fun accept_msgpack_serializer(v: MsgPackSerializer)

serialization :: Serializable :: accept_msgpack_serializer

Hook to customize the serialization of this class to MessagePack
private fun add_doc_to_infobox(res: HInfoBox)

nitc :: MEntity :: add_doc_to_infobox

Append an entry for the doc in the given infobox
protected fun add_to_bundle(bundle: NativeBundle, key: JavaString)

serialization :: Serializable :: add_to_bundle

Called by []= to dynamically choose the appropriate method according
fun annotations: Set[String]

nitc :: AnnotatedMEntity :: annotations

Names of the annotations found on self declaration
protected fun annotations=(annotations: Set[String])

nitc :: AnnotatedMEntity :: annotations=

Names of the annotations found on self declaration
fun api_url: String

nitc :: MEntity :: api_url

URL to self within the JSON api.
abstract fun c_name: String

nitc :: MEntity :: c_name

A fully-qualified C-like identifier of this model entity.
protected fun c_name=(c_name: String)

nitc :: MPropDef :: c_name=

protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
fun collect_ancestors(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_ancestors

Collect self ancestors (direct and indirect)
abstract fun collect_children(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_children

Collect self children (direct descendants)
fun collect_descendants(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_descendants

Collect self descendants (direct and direct)
fun collect_linearization(mainmodule: MModule): nullable Array[MEntity]

nitc :: MEntity :: collect_linearization

Collect self linearization anchored on mainmodule
fun collect_modifiers: Array[String]

nitc :: MEntity :: collect_modifiers

Collect modifier keywords like redef, private etc
abstract fun collect_parents(mainmodule: MModule, filter: nullable ModelFilter): Set[MENTITY]

nitc :: MEntity :: collect_parents

Collect self parents (direct ancestors)
fun color: String

nitc :: MEntity :: color

private fun complete_mdoc: nullable MDoc

nitc :: MEntity :: complete_mdoc

Doc to use in completion
private fun complete_name: String

nitc :: MEntity :: complete_name

Actual name used in completion
protected fun const_color=(const_color: String)

nitc :: MEntity :: const_color=

fun core_serialize_to(serializer: Serializer)

serialization :: Serializable :: core_serialize_to

Actual serialization of self to serializer
abstract fun create_ast_representation(astbuilder: nullable ASTBuilder): ANode

nitc :: MEntity :: create_ast_representation

Build a ANode from self
fun cs_comment(no_color: nullable Bool): nullable String

nitc :: MEntity :: cs_comment

Returns the comment of this MEntity formatted for console.
fun cs_declaration(no_color: nullable Bool): String

nitc :: MEntity :: cs_declaration

Returns the complete MEntity declaration (modifiers + name + signature).
fun cs_full_name(no_color: nullable Bool): String

nitc :: MEntity :: cs_full_name

Returns self.full_name formatted for console
fun cs_icon(no_color: nullable Bool): String

nitc :: MEntity :: cs_icon

Text icon to be displayed in front of the entity
fun cs_list_item(no_color: nullable Bool): String

nitc :: MEntity :: cs_list_item

Returns self as a list element that can be displayed in console.
fun cs_location(no_color: nullable Bool): String

nitc :: MEntity :: cs_location

Source code location of this MEntity formatted for console
fun cs_short_comment(no_color: nullable Bool): nullable String

nitc :: MEntity :: cs_short_comment

Returns the comment of this MEntity formatted for console.
fun cs_signature(no_color: nullable Bool): String

nitc :: MEntity :: cs_signature

Returns self signature formatted for console.
fun cs_source_code: String

nitc :: MEntity :: cs_source_code

Source code associated to this MEntity.
fun css_classes: Array[String]

nitc :: MEntity :: css_classes

CSS classes used to decorate self
protected fun css_classes=(css_classes: Array[String])

nitc :: MEntity :: css_classes=

CSS classes used to decorate self
init defaultinit(mclassdef: MClassDef, mproperty: MPROPERTY, location: Location)

nitc :: MPropDef :: defaultinit

fun deprecation: nullable MDeprecationInfo

nitc :: MEntity :: deprecation

Is the entity deprecated?
fun deprecation=(deprecation: nullable MDeprecationInfo)

nitc :: MEntity :: deprecation=

Is the entity deprecated?
fun examples: Array[MExample]

nitc :: MEntity :: examples

Examples found for self
protected fun examples=(examples: Array[MExample])

nitc :: MEntity :: examples=

Examples found for self
init from_deserializer(deserializer: Deserializer)

serialization :: Serializable :: from_deserializer

Create an instance of this class from the deserializer
abstract fun full_name: String

nitc :: MEntity :: full_name

A fully-qualified name of this model entity.
protected fun full_name=(full_name: String)

nitc :: MPropDef :: full_name=

The full-name of mpropdefs combine the information about the classdef and the mproperty.
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun has_annotation(annotation: String): Bool

nitc :: AnnotatedMEntity :: has_annotation

Does self contains annotation in its declaration?
fun has_contract: Bool

nitc :: MPropDef :: has_contract

flag to indicate is the MPropDef has a contract
protected fun has_contract=(has_contract: Bool)

nitc :: MPropDef :: has_contract=

flag to indicate is the MPropDef has a contract
fun has_supercall: Bool

nitc :: MPropDef :: has_supercall

Does the MPropDef contains a call to super or a call of a super-constructor?
fun has_supercall=(has_supercall: Bool)

nitc :: MPropDef :: has_supercall=

Does the MPropDef contains a call to super or a call of a super-constructor?
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun hierarchy_poset(mainmodule: MModule, filter: nullable ModelFilter): POSet[MENTITY]

nitc :: MEntity :: hierarchy_poset

Build a poset representing self in it's own hierarchy
private fun href(v: NitlightVisitor): nullable String

nitc :: MEntity :: href

fun html_declaration: Template

nitc :: MEntity :: html_declaration

Returns the complete MEntity declaration decorated with HTML
fun html_full_name: String

nitc :: MEntity :: html_full_name

The MEntity full_name escaped for HTML
protected fun html_full_name=(html_full_name: String)

nitc :: MEntity :: html_full_name=

The MEntity full_name escaped for HTML
fun html_icon: BSIcon

nitc :: MEntity :: html_icon

An icon representative of the mentity
fun html_id: String

nitc :: MEntity :: html_id

The MEntity unique ID in the HTML output
protected fun html_id=(html_id: String)

nitc :: MEntity :: html_id=

The MEntity unique ID in the HTML output
fun html_name: String

nitc :: MEntity :: html_name

The MEntity name escaped for HTML
protected fun html_name=(html_name: String)

nitc :: MEntity :: html_name=

The MEntity name escaped for HTML
abstract fun html_namespace: Template

nitc :: MEntity :: html_namespace

Returns full_name decorated with HTML links
fun html_signature(short: nullable Bool): Template

nitc :: MEntity :: html_signature

Returns the MEntity signature decorated with HTML
fun html_url: String

nitc :: MEntity :: html_url

The MEntity URL in the HTML output
protected fun html_url=(html_url: String)

nitc :: MEntity :: html_url=

The MEntity URL in the HTML output
abstract fun infobox(v: HtmlightVisitor): HInfoBox

nitc :: HInfoBoxable :: infobox

An new infobox documenting the entity
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
fun is_after: Bool

nitc :: MPropDef :: is_after

Does self have the after annotation?
fun is_after=(is_after: Bool)

nitc :: MPropDef :: is_after=

Does self have the after annotation?
fun is_after_all: Bool

nitc :: MPropDef :: is_after_all

Does self have the after_all annotation?
fun is_after_all=(is_after_all: Bool)

nitc :: MPropDef :: is_after_all=

Does self have the after_all annotation?
fun is_before: Bool

nitc :: MPropDef :: is_before

Does self have the before annotation?
fun is_before=(is_before: Bool)

nitc :: MPropDef :: is_before=

Does self have the before annotation?
fun is_before_all: Bool

nitc :: MPropDef :: is_before_all

Does self have the before_all annotation?
fun is_before_all=(is_before_all: Bool)

nitc :: MPropDef :: is_before_all=

Does self have the before_all annotation?
fun is_broken: Bool

nitc :: MEntity :: is_broken

The indication that the entity did not pass some semantic verifications.
fun is_broken=(is_broken: Bool)

nitc :: MEntity :: is_broken=

The indication that the entity did not pass some semantic verifications.
fun is_example: Bool

nitc :: MEntity :: is_example

Is self existing for an example purpose?
fun is_fictive: Bool

nitc :: MEntity :: is_fictive

Is self created for internal purpose?
fun is_fictive=(is_fictive: Bool)

nitc :: MEntity :: is_fictive=

Is self created for internal purpose?
fun is_intro: Bool

nitc :: MPropDef :: is_intro

Is self the definition that introduce the property?
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
fun is_test: Bool

nitc :: MEntity :: is_test

Is self created for unit testing purpose?
fun is_test=(is_test: Bool)

nitc :: MEntity :: is_test=

Is self created for unit testing purpose?
private fun jname: String

nitc :: MEntity :: jname

A Java compatible name for self
abstract fun json_namespace: JsonNamespace

nitc :: MEntity :: json_namespace

Return self.full_name as an object that can be serialized to json.
fun linkto(v: HtmlightVisitor): HTMLTag

nitc :: MEntity :: linkto

A HTML version of to_s with hyper-links.
fun linkto_text(v: HtmlightVisitor, text: String): HTMLTag

nitc :: MEntity :: linkto_text

Link to the self with a specific text.
fun location: Location

nitc :: MEntity :: location

The origin of the definition.
protected fun location=(location: Location)

nitc :: MPropDef :: location=

fun lookup_next_definition(mmodule: MModule, mtype: MType): MPROPDEF

nitc :: MPropDef :: lookup_next_definition

Return the next definition in linearization of mtype.
private fun make_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: MEntity :: make_node

Make a new NeoNode based on mentity.
fun mclassdef: MClassDef

nitc :: MPropDef :: mclassdef

The class definition where the property definition is
protected fun mclassdef=(mclassdef: MClassDef)

nitc :: MPropDef :: mclassdef=

The class definition where the property definition is
fun mdoc: nullable MDoc

nitc :: MEntity :: mdoc

The documentation associated to the entity
fun mdoc=(mdoc: nullable MDoc)

nitc :: MEntity :: mdoc=

The documentation associated to the entity
fun mdoc_or_fallback: nullable MDoc

nitc :: MEntity :: mdoc_or_fallback

The documentation associated to the entity or their main nested entity.
private fun mentity_kind_rank: Int

nitc :: MEntity :: mentity_kind_rank

Compare MEntity class kind
fun mexample: nullable MExample

nitc :: MEntity :: mexample

Return this entity as a MExample
protected fun mexample=(mexample: nullable MExample)

nitc :: MEntity :: mexample=

Return this entity as a MExample
abstract fun model: Model

nitc :: MEntity :: model

A Model Entity has a direct link to its model
fun mproperty: MPROPERTY

nitc :: MPropDef :: mproperty

The associated global property
protected fun mproperty=(mproperty: MPROPERTY)

nitc :: MPropDef :: mproperty=

The associated global property
protected fun msgpack_extra_array_items: Int

serialization :: Serializable :: msgpack_extra_array_items

Hook to request a larger than usual metadata array
abstract fun name: String

nitc :: MEntity :: name

The short (unqualified) name of this model entity.
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
abstract fun nitdoc_breadcrumbs: Array[MEntity]

nitc :: MEntity :: nitdoc_breadcrumbs

MEntities composing the breadcrumbs of a nitdoc page
protected fun nitdoc_breadcrumbs=(nitdoc_breadcrumbs: Array[MEntity])

nitc :: MPropDef :: nitdoc_breadcrumbs=

intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun ratings(config: NitwebConfig, user: nullable String): JsonObject

nitc :: MEntity :: ratings

Get the ratings of a mentity
fun ratings_by_dimension(config: NitwebConfig, dimension: String, user: nullable String): JsonObject

nitc :: MEntity :: ratings_by_dimension

Get the ratings of a dimension
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
fun serialize_msgpack(plain: nullable Bool): Bytes

serialization :: Serializable :: serialize_msgpack

Serialize self to MessagePack bytes
fun serialize_to(serializer: Serializer)

serialization :: Serializable :: serialize_to

Serialize self to serializer
fun serialize_to_json(plain: nullable Bool, pretty: nullable Bool): String

serialization :: Serializable :: serialize_to_json

Serialize self to JSON
private fun serialize_to_or_delay(v: Serializer)

serialization :: Serializable :: serialize_to_or_delay

Accept references or force direct serialization (using serialize_to)
private fun source_url(url_pattern: nullable String): String

nitc :: MEntity :: source_url

Render a HTML link for the MEntity location
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
fun to_dot_node: DotNode

nitc :: MEntity :: to_dot_node

Return self as a DotNode
fun to_json: String

serialization :: Serializable :: to_json

Serialize self to plain JSON
fun to_json_ref: MEntityRef

nitc :: MEntity :: to_json_ref

Return a new MEntityRef to self.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

private fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode

nitc :: MEntity :: to_node

Build a NeoNode representing self.
fun to_pretty_json: String

serialization :: Serializable :: to_pretty_json

Serialize self to plain pretty JSON
fun to_s: String

core :: Object :: to_s

User readable representation of self.
protected fun to_s=(to_s: String)

nitc :: MPropDef :: to_s=

Internal name combining the module, the class and the property
abstract fun tpl_class(model: UMLModel): Writable

nitc :: MEntity :: tpl_class

Generates a dot-compatible Writable UML Class diagram from self
abstract fun tpl_module(model: UMLModel): Writable

nitc :: MEntity :: tpl_module

Builds a dot UML package diagram entity from self
fun visibility: MVisibility

nitc :: MEntity :: visibility

The visibility of the MEntity.
fun visit_all(v: ModelVisitor)

nitc :: MEntity :: visit_all

Call v.enter_visit on all nested entities.
fun web_url: String

nitc :: MEntity :: web_url

URL to self within the web interface.
private fun write_doc(model: Model, mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_doc

private fun write_extra_doc(model: Model, mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_extra_doc

Extra auto documentation to append to the stream
private fun write_location(mainmodule: MModule, stream: Writer)

nitc :: MEntity :: write_location

Location (file and line when available) of related declarations
package_diagram nitc::MPropDef MPropDef nitc::MEntity MEntity nitc::MPropDef->nitc::MEntity nitc::AnnotatedMEntity AnnotatedMEntity nitc::MPropDef->nitc::AnnotatedMEntity nitc::PropertyLayoutElement PropertyLayoutElement nitc::MPropDef->nitc::PropertyLayoutElement nitc::HInfoBoxable HInfoBoxable nitc::MEntity->nitc::HInfoBoxable serialization::Serializable Serializable nitc::MEntity->serialization::Serializable core::Object Object nitc::AnnotatedMEntity->core::Object nitc::PropertyLayoutElement->core::Object ...nitc::HInfoBoxable ... ...nitc::HInfoBoxable->nitc::HInfoBoxable ...serialization::Serializable ... ...serialization::Serializable->serialization::Serializable ...core::Object ... ...core::Object->core::Object nitc::MMethodDef MMethodDef nitc::MMethodDef->nitc::MPropDef nitc::MAttributeDef MAttributeDef nitc::MAttributeDef->nitc::MPropDef nitc::MVirtualTypeDef MVirtualTypeDef nitc::MVirtualTypeDef->nitc::MPropDef nitc::MInnerClassDef MInnerClassDef nitc::MInnerClassDef->nitc::MPropDef

Ancestors

interface HInfoBoxable

nitc :: HInfoBoxable

Model entity or whatever that can produce an infobox
interface Object

core :: Object

The root of the class hierarchy.
interface Serializable

serialization :: Serializable

Instances of this class can be passed to Serializer::serialize

Parents

abstract class AnnotatedMEntity

nitc :: AnnotatedMEntity

A MEntity that can hold annotations from it's source code
abstract class MEntity

nitc :: MEntity

A named and possibly documented entity in the model.

Children

class MAttributeDef

nitc :: MAttributeDef

A local definition of an attribute
class MInnerClassDef

nitc :: MInnerClassDef

An inner class definition.
class MMethodDef

nitc :: MMethodDef

A local definition of a method
class MVirtualTypeDef

nitc :: MVirtualTypeDef

A local definition of a virtual type

Class definitions

nitc $ MPropDef
# A definition of a property (local property)
#
# Unlike `MProperty`, a `MPropDef` is a local definition that belong to a
# specific class definition (which belong to a specific module)
abstract class MPropDef
	super MEntity

	# The associated `MProperty` subclass.
	# the two specialization hierarchy are symmetric
	type MPROPERTY: MProperty

	# Self class
	type MPROPDEF: MPropDef

	# The class definition where the property definition is
	var mclassdef: MClassDef

	# The associated global property
	var mproperty: MPROPERTY

	redef var location

	redef fun visibility do return mproperty.visibility

	init
	do
		mclassdef.mpropdefs.add(self)
		mproperty.mpropdefs.add(self)
		mclassdef.mpropdefs_by_property[mproperty] = self
		if mproperty.intro_mclassdef == mclassdef then
			assert not isset mproperty._intro
			mproperty.intro = self
		end
		self.to_s = "{mclassdef}${mproperty}"
	end

	# Actually the name of the `mproperty`
	redef fun name do return mproperty.name

	# The full-name of mpropdefs combine the information about the `classdef` and the `mproperty`.
	#
	# Therefore the combination of identifiers is awful,
	# the worst case being
	#
	#  * a property "p::m::A::x"
	#  * redefined in a refinement of a class "q::n::B"
	#  * in a module "r::o"
	#  * so "r::o$q::n::B$p::m::A::x"
	#
	# Fortunately, the full-name is simplified when entities are repeated.
	# For the previous case, the simplest form is "p$A$x".
	redef var full_name is lazy do
		var res = new FlatBuffer

		# The first part is the mclassdef. Worst case is "r::o$q::n::B"
		res.append mclassdef.full_name

		res.append "$"

		if mclassdef.mclass == mproperty.intro_mclassdef.mclass then
			# intro are unambiguous in a class
			res.append name
		else
			# Just try to simplify each part
			if mclassdef.mmodule.mpackage != mproperty.intro_mclassdef.mmodule.mpackage then
				# precise "p::m" only if "p" != "r"
				res.append mproperty.intro_mclassdef.mmodule.namespace_for(mproperty.visibility)
				res.append "::"
			else if mproperty.visibility <= private_visibility then
				# Same package ("p"=="q"), but private visibility,
				# does the module part ("::m") need to be displayed
				if mclassdef.mmodule.namespace_for(mclassdef.mclass.visibility) != mproperty.intro_mclassdef.mmodule.mpackage then
					res.append "::"
					res.append mproperty.intro_mclassdef.mmodule.name
					res.append "::"
				end
			end
			# precise "B" because it is not the same class than "A"
			res.append mproperty.intro_mclassdef.name
			res.append "::"
			# Always use the property name "x"
			res.append mproperty.name
		end
		return res.to_s
	end

	redef var c_name is lazy do
		var res = new FlatBuffer
		res.append mclassdef.c_name
		res.append "___"
		if mclassdef.mclass == mproperty.intro_mclassdef.mclass then
			res.append name.to_cmangle
		else
			if mclassdef.mmodule != mproperty.intro_mclassdef.mmodule then
				res.append mproperty.intro_mclassdef.mmodule.c_name
				res.append "__"
			end
			res.append mproperty.intro_mclassdef.name.to_cmangle
			res.append "__"
			res.append mproperty.name.to_cmangle
		end
		return res.to_s
	end

	redef fun model do return mclassdef.model

	# Internal name combining the module, the class and the property
	# Example: "mymodule$MyClass$mymethod"
	redef var to_s is noinit

	# Is self the definition that introduce the property?
	fun is_intro: Bool do return isset mproperty._intro and mproperty.intro == self

	# Return the next definition in linearization of `mtype`.
	#
	# This method is used to determine what method is called by a super.
	#
	# REQUIRE: `not mtype.need_anchor`
	fun lookup_next_definition(mmodule: MModule, mtype: MType): MPROPDEF
	do
		assert not mtype.need_anchor

		var mpropdefs = self.mproperty.lookup_all_definitions(mmodule, mtype)
		var i = mpropdefs.iterator
		while i.is_ok and i.item != self do i.next
		assert has_property: i.is_ok
		i.next
		assert has_next_property: i.is_ok
		return i.item
	end

	redef fun mdoc_or_fallback do return mdoc or else mproperty.mdoc_or_fallback

	# Does self have the `before` annotation?
	var is_before = false is writable

	# Does self have the `before_all` annotation?
	var is_before_all = false is writable

	# Does self have the `after` annotation?
	var is_after = false is writable

	# Does self have the `after_all` annotation?
	var is_after_all = false is writable
end
src/model/model.nit:2504,1--2648,3

nitc :: modelize_property $ MPropDef
redef class MPropDef
	# Does the MPropDef contains a call to super or a call of a super-constructor?
	# Subsequent phases of the frontend (esp. typing) set it if required
	var has_supercall: Bool = false is writable
end
src/modelize/modelize_property.nit:511,1--515,3

nitc :: neo $ MPropDef
redef class MPropDef
	redef fun to_node(nodes: HashMap[MEntity, NeoNode], model_name: nullable String): NeoNode do
		if nodes.has_key(self) then return nodes[self]
		var node = make_node(nodes, model_name)
		node.labels.add "MPropDef"
		node.out_edges.add(new NeoEdge(node, "DEFINES", mproperty.to_node(nodes, model_name)))
		node.labels.add self.class_name
		return node
	end
end
src/neo.nit:798,1--807,3

nitc :: abstract_compiler $ MPropDef
redef class MPropDef
	type VISITOR: AbstractCompilerVisitor
end
src/compiler/abstract_compiler.nit:2524,1--2526,3

nitc :: parse_annotations $ MPropDef
redef class MPropDef
	super AnnotatedMEntity

	redef var is_test is lazy do return has_annotation("test")

	redef var is_before is lazy do return has_annotation("before")

	redef var is_before_all is lazy do return has_annotation("before_all")

	redef var is_after is lazy do return has_annotation("after")

	redef var is_after_all is lazy do return has_annotation("after_all")
end
src/frontend/parse_annotations.nit:119,1--131,3

nitc :: astbuilder $ MPropDef
redef class MPropDef
	redef fun create_ast_representation(astbuilder: nullable ASTBuilder): APropdef is abstract
end
src/astbuilder.nit:956,1--958,3

nitc :: separate_compiler $ MPropDef
redef class MPropDef
	super PropertyLayoutElement
end
src/compiler/separate_compiler.nit:2652,1--2654,3

nitc :: model_collect $ MPropDef
redef class MPropDef

	redef fun collect_modifiers do
		var res = super
		if not is_intro then
			res.add "redef"
		else
			if mproperty.visibility != public_visibility then
				res.add mproperty.visibility.to_s
			end
		end
		var mprop = self
		if mprop isa MVirtualTypeDef then
			res.add "type"
		else if mprop isa MMethodDef then
			if mprop.is_abstract then
				res.add "abstract"
			else if mprop.is_intern then
				res.add "intern"
			end
			if mprop.mproperty.is_init then
				res.add "init"
			else
				res.add "fun"
			end
		else if mprop isa MAttributeDef then
			res.add "var"
		end
		return res
	end

	redef fun collect_linearization(mainmodule) do
		var mpropdefs = new Array[MPropDef]
		var mentity = self
		while not mentity.is_intro do
			mpropdefs.add mentity
			mentity = mentity.lookup_next_definition(mainmodule, mentity.mclassdef.bound_mtype)
		end
		mpropdefs.add mentity
		mainmodule.linearize_mpropdefs(mpropdefs)
		return mpropdefs
	end

	# Collect only the next definition of `self`
	redef fun collect_parents(mainmodule, filter) do
		var res = new HashSet[MENTITY]
		var mpropdef = self
		while not mpropdef.is_intro do
			mpropdef = mpropdef.lookup_next_definition(mclassdef.mmodule, mclassdef.bound_mtype)
			res.add mpropdef
		end
		return res
	end

	# Collect all children definitions that directly depend on `self`
	redef fun collect_children(mainmodule, filter) do
		var res = new HashSet[MENTITY]
		for mpropdef in mproperty.collect_mpropdefs(filter) do
			if mpropdef.collect_parents(mainmodule, filter).has(self) then res.add mpropdef
		end
		return res
	end
end
src/model/model_collect.nit:1117,1--1179,3

nitc :: contracts $ MPropDef
redef class MPropDef
	# flag to indicate is the `MPropDef` has a contract
	var has_contract = false
end
src/contracts.nit:765,1--768,3

nitc :: term_model $ MPropDef
redef class MPropDef
	redef fun cs_icon(no_color) do
		if is_intro then return visibility.cs_icon(no_color)
		return visibility.cs_visibility_color("*", no_color)
	end
end
src/doc/templates/term_model.nit:181,1--186,3

nitc :: model_index $ MPropDef
redef class MPropDef
	redef fun mentity_kind_rank do return 7
end
src/model/model_index.nit:670,1--672,3

nitc :: htmlight $ MPropDef
redef class MPropDef
	redef fun infobox(v)
	do
		var res = new HInfoBox(v, to_s)
		res.href = v.hrefto(self)
		if not v.show_infobox then return res
		if self isa MMethodDef then
			var msignature = self.msignature
			if msignature != null then res.new_field("fun").append(mproperty.name).add msignature.linkto(v)
		else if self isa MAttributeDef then
			var static_mtype = self.static_mtype
			if static_mtype != null then res.new_field("fun").append(mproperty.name).add static_mtype.linkto(v)
		else if self isa MVirtualTypeDef then
			var bound = self.bound
			if bound != null then res.new_field("add").append(mproperty.name).add bound.linkto(v)
		else
			res.new_field("wat?").append(mproperty.name)
		end

		if is_intro then
		else
			res.new_field("intro").add mproperty.intro.linkto_text(v, "in {mproperty.intro.mclassdef}")
		end
		add_doc_to_infobox(res)
		if mproperty.mpropdefs.length > 1 then
			var c = res.new_dropdown("redef", "redefinitions")
			for x in mproperty.mpropdefs do
				c.open("li").add x.linkto_text(v, "in {x.mclassdef}")
			end
		end

		return res
	end
end
src/htmlight.nit:540,1--573,3

nitc :: nitlight $ MPropDef
redef class MPropDef
	redef fun href(v)
	do
		var m = mclassdef.mmodule.href(v)
		if m == null then return null
		return m + "#" + to_s
	end
end
src/nitlight.nit:76,1--83,3

nitc :: html_model $ MPropDef
redef class MPropDef
	redef fun css_classes do return super + mproperty.css_classes

	redef fun html_namespace do
		var tpl = new Template
		tpl.add mclassdef.html_namespace
		tpl.add " :: "
		tpl.add html_link
		return tpl
	end

	redef fun html_icon do
		if is_intro then
			return new BSIcon("plus", css_classes)
		end
		return new BSIcon("asterisk", css_classes)
	end
end
src/doc/templates/html_model.nit:221,1--238,3

nitc :: static_base $ MPropDef
redef class MPropDef
	redef var nitdoc_breadcrumbs is lazy do
		var res = new Array[MEntity].from(mclassdef.nitdoc_breadcrumbs)
		res.add self
		return res
	end
end
src/doc/static/static_base.nit:295,1--301,3

nitc :: static_html $ MPropDef
redef class MPropDef
	redef var html_url is lazy do
		if is_intro then return mproperty.html_url
		return "{mproperty.html_url}?def=def_code_{html_id}#lin"
	end
end
src/doc/static/static_html.nit:403,1--408,3

nitc :: api_base $ MPropDef
redef class MPropDef
	redef fun web_url do return "{mproperty.web_url}/lin#{full_name}"
end
src/doc/api/api_base.nit:197,1--199,3