This section describes the behavior of permission objects: each type of permission has its own particular semantics for defining and interpreting the permission, however all permissions support a common set of operations described here. Specific permission details are documented in their respective API documents.
Only developers of libraries and classes that define or expose protected resources need to use permission objects. Permission objects should have class names of the form, SomethingPermission.
In working with permission objects, an important special case to handle properly is the no-permission case. In a permission grant, the absence of the permission object in the grant means that permission was not granted. Also, the result of set operations on permissions may result in NULL to represent the no-permission case. Code that may generate such a NULL permission must check for it explicitly to avoid a possible fault attempting to call a method on a null object. However, all permissions must support the no-permission state in order to implement the standard constructor as defined in the following section.