Dodo doc > Types > Type Members

Type members

A type can have its own attributes and functions independently from the attributes and functions of type instances. These members of the type are accessed through the type name.

Type members are declared by prefixing their name by the type name and a dot.


def Integer._MAX_VALUE() = 0x7FFFFFFF
enum Drawing.paperFormat = a4
Orange Orange.newWithVariety(String)

Rationale: as a type has a declaration block it can be used to host variables and functions which are related to the type and not to a particular instance. The prefix notation allows to distinguish between type member and instance members without using a specifier.

^ 4.4. Nested Types

v 4.6. Constructors and Methods