The base class for all definitions.
A definition is something in source code that can be referred to by name: a package, namespace, class, interface, function, getter, setter, parameter, variable, constant, event, style, or effect.
Each definition has
- a source location;
- an optional list of metadata annotations;
- a namespace reference indicating its visibility, such as
public
; - a set of flags indicating modifiers such as
static
or override
; - a base, or unqualified, name;
- a type reference (which may be
null
for some types of definitions.
Specific types of definitions of course store additional information. For example, a class definition stores a reference to the class it extends and references to the interfaces that it implements.
Definitions refer to other definitions indirectly, by name, using an IReference
. See the references
subpackage for an explanation of this design.