Next: Interoperability, Previous: Classes, Up: Top [Contents]
3 Member Keywords
Keywords are defined within the context of the definition object (see Definition Object). In the sections that follow, let C denote a class that contains the definition object dfn, which in turn contains keywords within the declaration of method name, whose definition is denoted by value.
The table below summarizes the available keywords accepted by keywords.
Keyword | Description |
---|---|
public | Places member name into the public API for C (see Access Modifiers); this is the default visibility. |
protected | Places member name into the protected API for C (see Access Modifiers). |
private | Places member name into the private API for C (see Access Modifiers); this is done implicitly if the member name is prefixed with an underscore, unless another access modifier is explicitly provided. |
static | Binds member name to class C rather than instance of C. Member data shared with each instance of type C. See Static Members. |
abstract | Declares member name and defers definition to subtype.
value is interpreted as an argument list and must be of type
array . May only be used with methods. Member name must be part
of dfn of either an
Interface or AbstractClass . See Abstract Members. |
const | Defines an immutable property name. May not be used with methods or getters/setters. See Constants. |
virtual | Declares that method name may be overridden by subtypes. Methods without this keyword may not be overridden. May only be used with methods. See Inheritance. |
override | Overrides method name of supertype of C with value. May only override virtual methods. May only be used with methods. See Inheritance. |
proxy | Proxies calls to method name to the object stored in property value. |
Not all keywords are supported by each member and some keywords conflict with each other. More information can be found in the appropriate sections as mentioned above in Table 3.1.
• Access Modifiers: | Control the context in which members may be accessed |
Next: Interoperability, Previous: Classes, Up: Top [Contents]