12. Slots
Overview
Types are composed of uniquely named slots. Slots define the state and behavior of the object oriented type. There are two types of slots:
Slot Modifiers
Slots may be annotated with one of the following modifiers:
abstract: see fields and methodsconst: see fieldsnew: see methodsinternal: see protectionnative: see fields and methodsoverride: see fields and methodsprivate: see protectionprotected: see protectionpublic: see protectionstatic: see fields and methodsvirtual: see fields and methods
Protection
A slot can be annotated with one of the following modifiers to define its visibility:
public: everyone can access the slotprotected: only subclasses and types within declaring pod can access the slotinternal: only types within the declaring pod can access the slotprivate: only declaring type can access the slot
If no protection keyword is specified, the slot defaults to public.