A standard class definition with a name, superclasses and properties

Introduced properties

private var _n_cbra: nullable TCbra

nitc :: AStdClassdef :: _n_cbra

The ] symbol
private var _n_classkind: AClasskind

nitc :: AStdClassdef :: _n_classkind

The class kind (interface, abstract class, etc.)
private var _n_extern_code_block: nullable AExternCodeBlock

nitc :: AStdClassdef :: _n_extern_code_block

The extern block code
private var _n_formaldefs: ANodes[AFormaldef]

nitc :: AStdClassdef :: _n_formaldefs

The list of formal parameter types
private var _n_kwend: TKwend

nitc :: AStdClassdef :: _n_kwend

The end keyword
private var _n_obra: nullable TObra

nitc :: AStdClassdef :: _n_obra

The [ symbol
private var _n_qid: nullable AQclassid

nitc :: AStdClassdef :: _n_qid

The name of the class
fun how_serialize: nullable Bool

nitc :: AStdClassdef :: how_serialize

Is this classed marked serialize? in part or fully?
init init_astdclassdef(n_doc: nullable ADoc, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, n_classkind: nullable AClasskind, n_qid: nullable AQclassid, n_obra: nullable TObra, n_formaldefs: Collection[Object], n_cbra: nullable TCbra, n_extern_code_block: nullable AExternCodeBlock, n_propdefs: Collection[Object], n_kwend: nullable TKwend)

nitc :: AStdClassdef :: init_astdclassdef

private init make(mclassdef: nullable MClassDef, n_visibility: nullable AVisibility, n_formaldefs: Collection[Object], n_extern_code_block: nullable AExternCodeBlock, n_propdefs: Collection[Object], n_classkind: nullable AClasskind)

nitc :: AStdClassdef :: make

fun n_cbra: nullable TCbra

nitc :: AStdClassdef :: n_cbra

The ] symbol
fun n_cbra=(n_cbra: nullable TCbra)

nitc :: AStdClassdef :: n_cbra=

The ] symbol
fun n_classkind: AClasskind

nitc :: AStdClassdef :: n_classkind

The class kind (interface, abstract class, etc.)
fun n_classkind=(n_classkind: AClasskind)

nitc :: AStdClassdef :: n_classkind=

The class kind (interface, abstract class, etc.)
fun n_extern_code_block: nullable AExternCodeBlock

nitc :: AStdClassdef :: n_extern_code_block

The extern block code
fun n_extern_code_block=(n_extern_code_block: nullable AExternCodeBlock)

nitc :: AStdClassdef :: n_extern_code_block=

The extern block code
fun n_formaldefs: ANodes[AFormaldef]

nitc :: AStdClassdef :: n_formaldefs

The list of formal parameter types
protected fun n_formaldefs=(n_formaldefs: ANodes[AFormaldef])

nitc :: AStdClassdef :: n_formaldefs=

The list of formal parameter types
fun n_kwend: TKwend

nitc :: AStdClassdef :: n_kwend

The end keyword
fun n_kwend=(n_kwend: TKwend)

nitc :: AStdClassdef :: n_kwend=

The end keyword
fun n_obra: nullable TObra

nitc :: AStdClassdef :: n_obra

The [ symbol
fun n_obra=(n_obra: nullable TObra)

nitc :: AStdClassdef :: n_obra=

The [ symbol
fun n_qid: nullable AQclassid

nitc :: AStdClassdef :: n_qid

The name of the class
fun n_qid=(n_qid: nullable AQclassid)

nitc :: AStdClassdef :: n_qid=

The name of the class

Redefined properties

redef type SELF: AStdClassdef

nitc $ AStdClassdef :: SELF

Type of this instance, automatically specialized in every class
redef fun accept_pretty_printer(v: PrettyPrinterVisitor)

nitc :: pretty $ AStdClassdef :: accept_pretty_printer

Start visit of self using a PrettyPrinterVisitor
redef fun decorate_tag(v: HtmlightVisitor, res: HTMLTag, token: Token): nullable HInfoBox

nitc :: htmlight $ AStdClassdef :: decorate_tag

Add aditionnal information on a child-token and return an additionnal HInfoBox on it
redef fun hot_location: Location

nitc $ AStdClassdef :: hot_location

The location of the important part of the node (identifier or whatever)
redef fun is_inlinable: Bool

nitc :: pretty $ AStdClassdef :: is_inlinable

Is self printable in one line?
redef fun make_tag(v: HtmlightVisitor): nullable HTMLTag

nitc :: htmlight $ AStdClassdef :: make_tag

Optionally creates a tag that encapsulate the AST element on HTML rendering
redef fun n_cbra=(node: nullable TCbra)

nitc :: parser_prod $ AStdClassdef :: n_cbra=

The ] symbol
redef fun n_classkind=(node: AClasskind)

nitc :: parser_prod $ AStdClassdef :: n_classkind=

The class kind (interface, abstract class, etc.)
redef fun n_doc=(node: nullable ADoc)

nitc :: parser_prod $ AStdClassdef :: n_doc=

The documentation
redef fun n_extern_code_block=(node: nullable AExternCodeBlock)

nitc :: parser_prod $ AStdClassdef :: n_extern_code_block=

The extern block code
redef fun n_kwend=(node: TKwend)

nitc :: parser_prod $ AStdClassdef :: n_kwend=

The end keyword
redef fun n_kwredef=(node: nullable TKwredef)

nitc :: parser_prod $ AStdClassdef :: n_kwredef=

The redef keyword
redef fun n_obra=(node: nullable TObra)

nitc :: parser_prod $ AStdClassdef :: n_obra=

The [ symbol
redef fun n_qid=(node: nullable AQclassid)

nitc :: parser_prod $ AStdClassdef :: n_qid=

The name of the class
redef fun n_visibility=(node: nullable AVisibility)

nitc :: parser_prod $ AStdClassdef :: n_visibility=

The declared visibility
redef fun replace_child(old_child: ANode, new_child: nullable ANode)

nitc :: parser_prod $ AStdClassdef :: replace_child

Replace a child with an other node in the AST
redef fun start_token: nullable Token

nitc :: pretty $ AStdClassdef :: start_token

The token where the production really start (skipping ADoc).
redef fun visit_all(v: Visitor)

nitc :: parser_prod $ AStdClassdef :: visit_all

Visit all nodes in order.

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 SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _all_defs: nullable Array[AClassdef]

nitc :: AClassdef :: _all_defs

All (self and other) definitions for the same mclassdef
private var _build_properties_is_done: Bool

nitc :: AClassdef :: _build_properties_is_done

Marker used in ModelBuilder::build_properties
private var _first_location: nullable Location

nitc :: Prod :: _first_location

Location on the first token after the start of a production
private var _first_token: nullable Token

nitc :: Prod :: _first_token

The first token of the production in the AST
private var _force_block: Bool

nitc :: ANode :: _force_block

Force self to be rendered as a block.
private var _force_inline: Bool

nitc :: ANode :: _force_inline

Force self to be rendered as a line.
private var _is_broken: Bool

nitc :: ANode :: _is_broken

The indication that the node did not pass some semantic verifications.
private var _last_token: nullable Token

nitc :: Prod :: _last_token

The last token of the production in the AST
private var _location: Location

nitc :: ANode :: _location

Location is set during AST building. Once built, location can not be null.
private var _mclass: nullable MClass

nitc :: AClassdef :: _mclass

The associated MClass once build by a ModelBuilder
private var _mclassdef: nullable MClassDef

nitc :: AClassdef :: _mclassdef

The associated MClassDef once build by a ModelBuilder
private var _n_annotations: nullable AAnnotations

nitc :: Prod :: _n_annotations

All the annotations attached directly to the node
private var _n_cbra: nullable TCbra

nitc :: AStdClassdef :: _n_cbra

The ] symbol
private var _n_classkind: AClasskind

nitc :: AStdClassdef :: _n_classkind

The class kind (interface, abstract class, etc.)
private var _n_doc: nullable ADoc

nitc :: ADefinition :: _n_doc

The documentation
private var _n_extern_code_block: nullable AExternCodeBlock

nitc :: AStdClassdef :: _n_extern_code_block

The extern block code
private var _n_formaldefs: ANodes[AFormaldef]

nitc :: AStdClassdef :: _n_formaldefs

The list of formal parameter types
private var _n_kwend: TKwend

nitc :: AStdClassdef :: _n_kwend

The end keyword
private var _n_kwredef: nullable TKwredef

nitc :: ADefinition :: _n_kwredef

The redef keyword
private var _n_obra: nullable TObra

nitc :: AStdClassdef :: _n_obra

The [ symbol
private var _n_propdefs: ANodes[APropdef]

nitc :: AClassdef :: _n_propdefs

All the declared properties (including the main method)
private var _n_qid: nullable AQclassid

nitc :: AStdClassdef :: _n_qid

The name of the class
private var _n_visibility: nullable AVisibility

nitc :: ADefinition :: _n_visibility

The declared visibility
private var _parent: nullable ANode

nitc :: ANode :: _parent

Parent of the node in the AST
fun accept_forward_analysis(v: ForwardAnalysis)

nitc :: ANode :: accept_forward_analysis

Apply the forward analysis v to self.
private abstract fun accept_pretty_printer(v: PrettyPrinterVisitor)

nitc :: ANode :: accept_pretty_printer

Start visit of self using a PrettyPrinterVisitor
fun accept_reaching_defs(v: ReachingDefsAnalysis)

nitc :: ANode :: accept_reaching_defs

Apply a ReachingDefsAnalysis to self.
fun all_defs: nullable Array[AClassdef]

nitc :: AClassdef :: all_defs

All (self and other) definitions for the same mclassdef
protected fun all_defs=(all_defs: nullable Array[AClassdef])

nitc :: AClassdef :: all_defs=

All (self and other) definitions for the same mclassdef
private fun bad_expr_message(child: AExpr): nullable String

nitc :: ANode :: bad_expr_message

An additional information message to explain the role of a child expression.
private fun build_properties_is_done: Bool

nitc :: AClassdef :: build_properties_is_done

Marker used in ModelBuilder::build_properties
private fun build_properties_is_done=(build_properties_is_done: Bool)

nitc :: AClassdef :: build_properties_is_done=

Marker used in ModelBuilder::build_properties
private fun call(v: NaiveInterpreter, mpropdef: MMethodDef, arguments: Array[Instance]): nullable Instance

nitc :: AClassdef :: call

Execute an implicit mpropdef associated with the current node.
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.
abstract fun clone: SELF

core :: Cloneable :: clone

Duplicate self
fun collect_annotations_by_name(name: String): Array[AAnnotation]

nitc :: ANode :: collect_annotations_by_name

Do a deep search and return an array of node that are annotated
private fun collect_comments: Array[TComment]

nitc :: Prod :: collect_comments

Collect all TComment contained in the production
private abstract fun collect_length: Int

nitc :: ANode :: collect_length

Collect the length (in Char) of the node.
fun collect_text: String

nitc :: Prod :: collect_text

Join the text of all visited tokens
fun collect_tokens_by_text(text: String): Array[Token]

nitc :: ANode :: collect_tokens_by_text

Do a deep search and return an array of tokens that match a given text
fun common_parent(other: ANode): nullable ANode

nitc :: ANode :: common_parent

The most specific common parent between self and other
fun debug(message: String)

nitc :: ANode :: debug

Display a message for the colored location of the node
protected fun decorate_tag(v: HtmlightVisitor, res: HTMLTag, token: Token): nullable HInfoBox

nitc :: ANode :: decorate_tag

Add aditionnal information on a child-token and return an additionnal HInfoBox on it
fun depth: Int

nitc :: ANode :: depth

Number of nodes between self and the root of the AST
fun detach

nitc :: ANode :: detach

Detach a node from its parent
private fun do_cloneable(v: CloneVisitor)

nitc :: ANode :: do_cloneable

fun dump_info(v: ASTDump): String

nitc :: ANode :: dump_info

Information to display on a node
fun dump_tree(display_structural: nullable Bool, display_line: nullable Bool)

nitc :: ANode :: dump_tree

Write the subtree on stdout.
fun fatal(v: NaiveInterpreter, message: String)

nitc :: ANode :: fatal

Aborts the program with a message
fun first_location: nullable Location

nitc :: Prod :: first_location

Location on the first token after the start of a production
protected fun first_location=(first_location: nullable Location)

nitc :: Prod :: first_location=

Location on the first token after the start of a production
fun first_token: nullable Token

nitc :: Prod :: first_token

The first token of the production in the AST
protected fun first_token=(first_token: nullable Token)

nitc :: Prod :: first_token=

The first token of the production in the AST
private fun force_block: Bool

nitc :: ANode :: force_block

Force self to be rendered as a block.
private fun force_block=(force_block: Bool)

nitc :: ANode :: force_block=

Force self to be rendered as a block.
private fun force_inline: Bool

nitc :: ANode :: force_inline

Force self to be rendered as a line.
private fun force_inline=(force_inline: Bool)

nitc :: ANode :: force_inline=

Force self to be rendered as a line.
fun get_annotations(name: String): Array[AAnnotation]

nitc :: Prod :: get_annotations

Return all its annotations of a given name in the order of their declaration
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun get_single_annotation(name: String, modelbuilder: ModelBuilder): nullable AAnnotation

nitc :: Prod :: get_single_annotation

Try to get its single annotation with a given name
fun hash: Int

core :: Object :: hash

The hash code of the object.
fun hot_location: Location

nitc :: ANode :: hot_location

The location of the important part of the node (identifier or whatever)
fun how_serialize: nullable Bool

nitc :: AStdClassdef :: how_serialize

Is this classed marked serialize? in part or fully?
fun infobox(v: HtmlightVisitor): nullable HInfoBox

nitc :: ANode :: infobox

Return a optional infobox
init init

core :: Object :: init

init init_astdclassdef(n_doc: nullable ADoc, n_kwredef: nullable TKwredef, n_visibility: nullable AVisibility, n_classkind: nullable AClasskind, n_qid: nullable AQclassid, n_obra: nullable TObra, n_formaldefs: Collection[Object], n_cbra: nullable TCbra, n_extern_code_block: nullable AExternCodeBlock, n_propdefs: Collection[Object], n_kwend: nullable TKwend)

nitc :: AStdClassdef :: init_astdclassdef

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_block: Bool

nitc :: Prod :: is_block

Is the production contained in full block of line?
fun is_broken: Bool

nitc :: ANode :: is_broken

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

nitc :: ANode :: is_broken=

The indication that the node did not pass some semantic verifications.
private fun is_inlinable: Bool

nitc :: ANode :: is_inlinable

Is self printable in one line?
private fun is_noserialize: Bool

nitc :: ANode :: is_noserialize

Is this node annotated to not be made serializable?
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.
private fun is_serialize: Bool

nitc :: ANode :: is_serialize

Is this node annotated to be made serializable?
fun is_span: Bool

nitc :: Prod :: is_span

Is the production a part of a single line (without being a block)
fun is_structural: Bool

nitc :: ANode :: is_structural

Is self a token or a pure-structural production like AQId?
fun last_token: nullable Token

nitc :: Prod :: last_token

The last token of the production in the AST
protected fun last_token=(last_token: nullable Token)

nitc :: Prod :: last_token=

The last token of the production in the AST
fun location: Location

nitc :: ANode :: location

Location is set during AST building. Once built, location can not be null.
fun location=(location: Location)

nitc :: ANode :: location=

Location is set during AST building. Once built, location can not be null.
private init make(mclassdef: nullable MClassDef, n_visibility: nullable AVisibility, n_formaldefs: Collection[Object], n_extern_code_block: nullable AExternCodeBlock, n_propdefs: Collection[Object], n_classkind: nullable AClasskind)

nitc :: AStdClassdef :: make

protected fun make_tag(v: HtmlightVisitor): nullable HTMLTag

nitc :: ANode :: make_tag

Optionally creates a tag that encapsulate the AST element on HTML rendering
fun mclass: nullable MClass

nitc :: AClassdef :: mclass

The associated MClass once build by a ModelBuilder
protected fun mclass=(mclass: nullable MClass)

nitc :: AClassdef :: mclass=

The associated MClass once build by a ModelBuilder
fun mclassdef: nullable MClassDef

nitc :: AClassdef :: mclassdef

The associated MClassDef once build by a ModelBuilder
protected fun mclassdef=(mclassdef: nullable MClassDef)

nitc :: AClassdef :: mclassdef=

The associated MClassDef once build by a ModelBuilder
private fun must_be_block: Bool

nitc :: ANode :: must_be_block

Does self have to be rendered as a block?
private fun must_be_inline: Bool

nitc :: ANode :: must_be_inline

Does self have be rendered as a line?
fun n_annotations: nullable AAnnotations

nitc :: Prod :: n_annotations

All the annotations attached directly to the node
fun n_annotations=(n_annotations: nullable AAnnotations)

nitc :: Prod :: n_annotations=

All the annotations attached directly to the node
fun n_cbra: nullable TCbra

nitc :: AStdClassdef :: n_cbra

The ] symbol
fun n_cbra=(n_cbra: nullable TCbra)

nitc :: AStdClassdef :: n_cbra=

The ] symbol
fun n_classkind: AClasskind

nitc :: AStdClassdef :: n_classkind

The class kind (interface, abstract class, etc.)
fun n_classkind=(n_classkind: AClasskind)

nitc :: AStdClassdef :: n_classkind=

The class kind (interface, abstract class, etc.)
fun n_doc: nullable ADoc

nitc :: ADefinition :: n_doc

The documentation
fun n_doc=(n_doc: nullable ADoc)

nitc :: ADefinition :: n_doc=

The documentation
fun n_extern_code_block: nullable AExternCodeBlock

nitc :: AStdClassdef :: n_extern_code_block

The extern block code
fun n_extern_code_block=(n_extern_code_block: nullable AExternCodeBlock)

nitc :: AStdClassdef :: n_extern_code_block=

The extern block code
fun n_formaldefs: ANodes[AFormaldef]

nitc :: AStdClassdef :: n_formaldefs

The list of formal parameter types
protected fun n_formaldefs=(n_formaldefs: ANodes[AFormaldef])

nitc :: AStdClassdef :: n_formaldefs=

The list of formal parameter types
fun n_kwend: TKwend

nitc :: AStdClassdef :: n_kwend

The end keyword
fun n_kwend=(n_kwend: TKwend)

nitc :: AStdClassdef :: n_kwend=

The end keyword
fun n_kwredef: nullable TKwredef

nitc :: ADefinition :: n_kwredef

The redef keyword
fun n_kwredef=(n_kwredef: nullable TKwredef)

nitc :: ADefinition :: n_kwredef=

The redef keyword
fun n_obra: nullable TObra

nitc :: AStdClassdef :: n_obra

The [ symbol
fun n_obra=(n_obra: nullable TObra)

nitc :: AStdClassdef :: n_obra=

The [ symbol
fun n_propdefs: ANodes[APropdef]

nitc :: AClassdef :: n_propdefs

All the declared properties (including the main method)
protected fun n_propdefs=(n_propdefs: ANodes[APropdef])

nitc :: AClassdef :: n_propdefs=

All the declared properties (including the main method)
fun n_qid: nullable AQclassid

nitc :: AStdClassdef :: n_qid

The name of the class
fun n_qid=(n_qid: nullable AQclassid)

nitc :: AStdClassdef :: n_qid=

The name of the class
fun n_visibility: nullable AVisibility

nitc :: ADefinition :: n_visibility

The declared visibility
fun n_visibility=(n_visibility: nullable AVisibility)

nitc :: ADefinition :: n_visibility=

The declared visibility
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
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 parent: nullable ANode

nitc :: ANode :: parent

Parent of the node in the AST
protected fun parent=(parent: nullable ANode)

nitc :: ANode :: parent=

Parent of the node in the AST
fun parentize_tokens

nitc :: ANode :: parentize_tokens

Visit the AST and computes advanced AST attributes on Tokens and Prod
private abstract fun replace_child(old_child: ANode, new_child: nullable ANode)

nitc :: ANode :: replace_child

Replace a child with an other node in the AST
fun replace_clone

nitc :: ANode :: replace_clone

Create a new clone of self
fun replace_with(node: ANode)

nitc :: ANode :: replace_with

Replace itself with an other node in the AST
fun root: ANode

nitc :: ANode :: root

The topmost ancestor of the element
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
private fun start_token: nullable Token

nitc :: Prod :: start_token

The token where the production really start (skipping ADoc).
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
fun to_xml: HTMLTag

nitc :: Prod :: to_xml

A XML representation of the AST
fun validate

nitc :: ANode :: validate

Recursively validate a AST node.
abstract fun visit_all(v: Visitor)

nitc :: ANode :: visit_all

Visit all nodes in order.
private abstract fun was_inline: Bool

nitc :: ANode :: was_inline

Does self was written in one line before transformation?
package_diagram nitc::AStdClassdef AStdClassdef nitc::AClassdef AClassdef nitc::AStdClassdef->nitc::AClassdef nitc::ADefinition ADefinition nitc::AStdClassdef->nitc::ADefinition nitc::Prod Prod nitc::AClassdef->nitc::Prod nitc::ADefinition->nitc::Prod ...nitc::Prod ... ...nitc::Prod->nitc::Prod

Ancestors

abstract class ANode

nitc :: ANode

Root of the AST class-hierarchy
interface Cloneable

core :: Cloneable

Something that can be cloned
interface Object

core :: Object

The root of the class hierarchy.
abstract class Prod

nitc :: Prod

Ancestor of all productions

Parents

abstract class AClassdef

nitc :: AClassdef

A class definition
abstract class ADefinition

nitc :: ADefinition

Abstract class for definition of entities

Class definitions

nitc $ AStdClassdef
# A standard class definition with a name, superclasses and properties
class AStdClassdef
	super AClassdef
	super ADefinition

	# The class kind (interface, abstract class, etc.)
	var n_classkind: AClasskind is writable, noinit

	# The name of the class
	var n_qid: nullable AQclassid = null is writable

	# The `[` symbol
	var n_obra: nullable TObra = null is writable

	# The list of formal parameter types
	var n_formaldefs = new ANodes[AFormaldef](self)

	# The `]` symbol
	var n_cbra: nullable TCbra = null is writable

	# The extern block code
	var n_extern_code_block: nullable AExternCodeBlock = null is writable

	# The `end` keyword
	var n_kwend: TKwend is writable, noinit

	fun n_superclasses: Array[ASuperPropdef] do
		return [for d in n_propdefs do if d isa ASuperPropdef then d]
	end

	redef fun hot_location do return n_qid.location
end
src/parser/parser_nodes.nit:1247,1--1278,3

nitc :: parser_prod $ AStdClassdef
redef class AStdClassdef
	init init_astdclassdef (
		n_doc: nullable ADoc,
		n_kwredef: nullable TKwredef,
		n_visibility: nullable AVisibility,
		n_classkind: nullable AClasskind,
		n_qid: nullable AQclassid,
		n_obra: nullable TObra,
		n_formaldefs: Collection[Object], # Should be Collection[AFormaldef]
		n_cbra: nullable TCbra,
		n_extern_code_block: nullable AExternCodeBlock,
		n_propdefs: Collection[Object], # Should be Collection[APropdef]
		n_kwend: nullable TKwend
	)
	do
		_n_doc = n_doc
		if n_doc != null then n_doc.parent = self
		_n_kwredef = n_kwredef
		if n_kwredef != null then n_kwredef.parent = self
		_n_visibility = n_visibility.as(not null)
		n_visibility.parent = self
		_n_classkind = n_classkind.as(not null)
		n_classkind.parent = self
		_n_qid = n_qid
		if n_qid != null then n_qid.parent = self
		_n_obra = n_obra
		if n_obra != null then n_obra.parent = self
		self.n_formaldefs.unsafe_add_all(n_formaldefs)
		_n_cbra = n_cbra
		if n_cbra != null then n_cbra.parent = self
		_n_extern_code_block = n_extern_code_block
		if n_extern_code_block != null then n_extern_code_block.parent = self
		self.n_propdefs.unsafe_add_all(n_propdefs)
		_n_kwend = n_kwend.as(not null)
		n_kwend.parent = self
	end

	redef fun replace_child(old_child: ANode, new_child: nullable ANode)
	do
		if _n_doc == old_child then
			n_doc = new_child.as(nullable ADoc)
			return
		end
		if _n_kwredef == old_child then
			n_kwredef = new_child.as(nullable TKwredef)
			return
		end
		if _n_visibility == old_child then
			n_visibility = new_child.as(AVisibility)
			return
		end
		if _n_classkind == old_child then
			n_classkind = new_child.as(AClasskind)
			return
		end
		if _n_qid == old_child then
			n_qid = new_child.as(nullable AQclassid)
			return
		end
		if _n_obra == old_child then
			n_obra = new_child.as(nullable TObra)
			return
		end
		if n_formaldefs.replace_child(old_child, new_child) then return
		if _n_cbra == old_child then
			n_cbra = new_child.as(nullable TCbra)
			return
		end
		if _n_extern_code_block == old_child then
			n_extern_code_block = new_child.as(nullable AExternCodeBlock)
			return
		end
		if n_propdefs.replace_child(old_child, new_child) then return
		if _n_kwend == old_child then
			n_kwend = new_child.as(TKwend)
			return
		end
	end

	redef fun n_doc=(node)
	do
		_n_doc = node
		if node != null then node.parent = self
	end
	redef fun n_kwredef=(node)
	do
		_n_kwredef = node
		if node != null then node.parent = self
	end
	redef fun n_visibility=(node)
	do
		_n_visibility = node
		node.parent = self
	end
	redef fun n_classkind=(node)
	do
		_n_classkind = node
		node.parent = self
	end
	redef fun n_qid=(node)
	do
		_n_qid = node
		if node != null then node.parent = self
	end
	redef fun n_obra=(node)
	do
		_n_obra = node
		if node != null then node.parent = self
	end
	redef fun n_cbra=(node)
	do
		_n_cbra = node
		if node != null then node.parent = self
	end
	redef fun n_extern_code_block=(node)
	do
		_n_extern_code_block = node
		if node != null then node.parent = self
	end
	redef fun n_kwend=(node)
	do
		_n_kwend = node
		node.parent = self
	end


	redef fun visit_all(v: Visitor)
	do
		v.enter_visit(_n_doc)
		v.enter_visit(_n_kwredef)
		v.enter_visit(_n_visibility)
		v.enter_visit(_n_classkind)
		v.enter_visit(_n_qid)
		v.enter_visit(_n_obra)
		n_formaldefs.visit_all(v)
		v.enter_visit(_n_cbra)
		v.enter_visit(_n_extern_code_block)
		n_propdefs.visit_all(v)
		v.enter_visit(_n_kwend)
	end
end
src/parser/parser_prod.nit:383,1--523,3

nitc :: pretty $ AStdClassdef
redef class AStdClassdef
	redef fun accept_pretty_printer(v) do
		v.visit n_doc
		var can_inline = v.can_inline(self)

		if not n_visibility isa APublicVisibility then
			v.visit n_visibility
			v.adds
		end

		if n_kwredef != null then
			v.visit n_kwredef
			v.adds
		end

		v.visit n_classkind
		v.adds
		v.visit n_qid

		if not n_formaldefs.is_empty then
			v.consume "["
			v.visit_list n_formaldefs
			v.consume "]"
		end

		if n_extern_code_block != null then
			v.adds
			v.visit n_extern_code_block
		end

		if can_inline then
			v.adds

			if not n_propdefs.is_empty then
				for n_superclass in n_propdefs do
					v.visit n_superclass
					v.adds
				end
			end
		else
			v.finish_line
			if v.skip_empty then v.addn
			v.indent += 1

			super
			v.catch_up n_kwend
			v.indent -= 1
		end

		v.visit n_kwend
		v.finish_line
		if v.skip_empty then v.addn
		assert v.indent == 0
	end

	redef fun is_inlinable do
		if not super then return false
		# FIXME: repair pretty-printing one-liner classes
		if n_propdefs.length > 0 then return false
		#if n_propdefs.length == 1 and not n_propdefs.first isa ASuperPropdef then return false
		if not collect_comments.is_empty then return false
		return true
	end

	redef fun start_token do
		if not n_visibility isa APublicVisibility then return n_visibility.first_token
		if n_kwredef != null then return n_kwredef
		return n_classkind.first_token
	end
end
src/pretty.nit:683,1--752,3

nitc :: serialization_model_phase $ AStdClassdef
redef class AStdClassdef
	private fun deserializer_npropdef: nullable AMethPropdef
	do
		for npropdef in n_propdefs do if npropdef isa AMethPropdef then
			var id = npropdef.n_methid
			if id isa AIdMethid and id.n_id.text == "deserialize_class_intern" then
				return npropdef
			end
		end

		return null
	end

	# Is this classed marked `serialize`? in part or fully?
	#
	# This method returns 3 possible values:
	# * `null`, this class is not to be serialized.
	# * `true`, the attributes of this class are to be serialized by default.
	# * `false`, the attributes of this class are to be serialized on demand only.
	fun how_serialize: nullable Bool
	do
		# Is there a declaration on the classdef or the module?
		var serialize = is_serialize

		if not serialize and not is_noserialize then
			# Is the module marked serialize?
			serialize = parent.as(AModule).is_serialize
		end

		if serialize then return true

		if not serialize then
			# Is there an attribute marked serialize?
			for npropdef in n_propdefs do
				if npropdef.is_serialize then
					return false
				end
			end
		end

		return null
	end
end
src/frontend/serialization_model_phase.nit:322,1--364,3

nitc :: astbuilder $ AStdClassdef
redef class AStdClassdef
	private init make(mclassdef: nullable MClassDef,
					n_visibility: nullable AVisibility,
					n_formaldefs : Collection[Object],
					n_extern_code_block : nullable AExternCodeBlock,
					n_propdefs : Collection[Object],
					n_classkind: nullable AClasskind)
	do
		if n_visibility == null then n_visibility = new APublicVisibility
		if n_classkind == null then n_classkind = new AConcreteClasskind.init_aconcreteclasskind(new TKwclass)
		var n_qid = new AQclassid.init_aqclassid(null, new TClassid)
		init_astdclassdef(null, null, n_visibility, n_classkind, n_qid, null, n_formaldefs, null, n_extern_code_block, n_propdefs, new TKwend)
		_mclassdef = mclassdef
		_mclass = mclassdef.mclass
	end
end
src/astbuilder.nit:318,1--333,3

nitc :: htmlight $ AStdClassdef
redef class AStdClassdef
	redef fun make_tag(v)
	do
		var res = new HTMLTag("span")
		res.add_class("nc_cdef")
		var md = mclassdef
		if md != null then res.attr("id", md.to_s)
		return res
	end
	redef fun decorate_tag(v, res, token)
	do
		if not token isa TClassid then return null
		res.add_class("nc_def")

		var md = mclassdef
		if md == null then return null
		return md.infobox(v)
	end
end
src/htmlight.nit:760,1--778,3