@private
The instance variable is accessible only within the class that declares it.
@protected
The instance variable is accessible within the class that declares it and within classes that inherit it.
@public
The instance variable is accessible everywhere.
@package
Using the modern runtime, an @package instance variable acts like @public inside the image that implements the class, but @private outside.
This is analogous to private_extern for variables and functions. Any code outside the class implementation’s image that tries to use the instance variable will get a link error. This is most useful for instance variables in framework classes, where @private may be too restrictive but @protected or @public too permissive.
The instance variable is accessible only within the class that declares it.
@protected
The instance variable is accessible within the class that declares it and within classes that inherit it.
@public
The instance variable is accessible everywhere.
@package
Using the modern runtime, an @package instance variable acts like @public inside the image that implements the class, but @private outside.
This is analogous to private_extern for variables and functions. Any code outside the class implementation’s image that tries to use the instance variable will get a link error. This is most useful for instance variables in framework classes, where @private may be too restrictive but @protected or @public too permissive.