A declaration.

Most declarations either define or have a type.

The general order of the children of a declaration is as follows:

Annotations
(Modifier | Type) Identifier TypeParameters? Parameters*
CaseTypes? ExtendedType? SatisfiedTypes?
TypeConstraints?
(Body | AnySpecifier? ";")

However, the only children common to all declarations are the name of the declared program element and its annotations.

Examples:

shared actual String string => "``outer.string`` by ``step``";
shared class Person(shared String name) { string => name; }
Initializer
Declaration()
Attributes
annotationsSource Codeshared formal Annotations annotations

The annotations on the declaration.

nameSource Codeshared formal Identifier? name

The name of the declared program element, if present.

Inherited Attributes
Attributes inherited from: Node
Attributes inherited from: Object
hash, string
Inherited Methods
Methods inherited from: Node
Methods inherited from: Object
equals