ContextManager instances.
This type of permission requires a name and an action. The name may be the name
of a context manager, or the special * name which means the permission applies to all context managers.
The action may be one or more of the following (each action name being separated by a comma):
get - allow getting the current contextgetPrivilegedSupplier - allow access to the ContextManager#getPrivilegedSupplier() methodgetGlobalDefault - allow access to the global default contextsetGlobalDefault - allow setting the global default instancesetGlobalDefaultSupplier - allow setting the global default instance suppliergetThreadDefault - allow access to the per-thread default contextsetThreadDefault - allow setting the per-thread default instancesetThreadDefaultSupplier - allow setting the per-thread default instance supplier* action name is allowed which implies all of the above actions.
The newPermissionCollection() method returns an optimized container for context permissions.
| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| private final transient int | |
| private transient String | |
| private static final long | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String | |
| pack-priv static final String |
| Access | Constructor and Description |
|---|---|
| public | ContextPermission(final String
name of the Permission object being created (must not be name, final String null)the actions string (must not be actions)null)Constructs a permission with the specified name. |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the object is a context permission that is exactly equal to this one; false otherwisethe other object obj)Implements abstract java. |
| public boolean | Returns: true if the permission is a context permission that is exactly equal to this one; false otherwisethe other permission permission)Determine if this permission is equal to the given permission. |
| pack-priv int | |
| public String | Returns: the actions stringImplements abstract java. |
| public int | Returns: the hash code of this permissionImplements abstract java. |
| public boolean | Returns: true if the other permission is not null and is a context permission which is implied by
this permission instance; false otherwisethe other permission permission)Implements abstract java. |
| public boolean | Returns: true if the other permission is not null and is a context permission which is implied by
this permission instance; false otherwisethe other permission permission)Determine if the given permission is implied by this permission. |
| private boolean | |
| pack-priv static boolean | |
| public PermissionCollection | Returns: a new permission collection instance (notnull) |
| private static int | |
| private static int | |
| pack-priv ContextPermission | |
| public ContextPermission | Returns: the new permission (notnull)the additional actions (must not be actions)null)Create a copy of this permission with the additional given actions. |
| pack-priv ContextPermission | |
| public ContextPermission | Returns: the new permission (notnull)the actions to subtract (must not be actions)null)Create a copy of this permission without any of the given actions. |
| ACTION_ALL | back to summary |
|---|---|
| private static final int ACTION_ALL | |
| ACTION_GET | back to summary |
|---|---|
| private static final int ACTION_GET | |
| ACTION_GET_CLASSLOADER_DEF | back to summary |
|---|---|
| private static final int ACTION_GET_CLASSLOADER_DEF | |
| ACTION_GET_GLOBAL_DEF | back to summary |
|---|---|
| private static final int ACTION_GET_GLOBAL_DEF | |
| ACTION_GET_PRIV_SUP | back to summary |
|---|---|
| private static final int ACTION_GET_PRIV_SUP | |
| ACTION_GET_THREAD_DEF | back to summary |
|---|---|
| private static final int ACTION_GET_THREAD_DEF | |
| ACTION_SET_CLASSLOADER_DEF | back to summary |
|---|---|
| private static final int ACTION_SET_CLASSLOADER_DEF | |
| ACTION_SET_CLASSLOADER_DEF_SUP | back to summary |
|---|---|
| private static final int ACTION_SET_CLASSLOADER_DEF_SUP | |
| ACTION_SET_GLOBAL_DEF | back to summary |
|---|---|
| private static final int ACTION_SET_GLOBAL_DEF | |
| ACTION_SET_GLOBAL_DEF_SUP | back to summary |
|---|---|
| private static final int ACTION_SET_GLOBAL_DEF_SUP | |
| ACTION_SET_THREAD_DEF | back to summary |
|---|---|
| private static final int ACTION_SET_THREAD_DEF | |
| ACTION_SET_THREAD_DEF_SUP | back to summary |
|---|---|
| private static final int ACTION_SET_THREAD_DEF_SUP | |
| actionBits | back to summary |
|---|---|
| private final transient int actionBits | |
| actionString | back to summary |
|---|---|
| private transient String actionString | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| STR_GET | back to summary |
|---|---|
| pack-priv static final String STR_GET | |
| STR_GET_CLASSLOADER_DEF | back to summary |
|---|---|
| pack-priv static final String STR_GET_CLASSLOADER_DEF | |
| STR_GET_GLOBAL_DEF | back to summary |
|---|---|
| pack-priv static final String STR_GET_GLOBAL_DEF | |
| STR_GET_PRIV_SUP | back to summary |
|---|---|
| pack-priv static final String STR_GET_PRIV_SUP | |
| STR_GET_THREAD_DEF | back to summary |
|---|---|
| pack-priv static final String STR_GET_THREAD_DEF | |
| STR_SET_CLASSLOADER_DEF | back to summary |
|---|---|
| pack-priv static final String STR_SET_CLASSLOADER_DEF | |
| STR_SET_CLASSLOADER_DEF_SUP | back to summary |
|---|---|
| pack-priv static final String STR_SET_CLASSLOADER_DEF_SUP | |
| STR_SET_GLOBAL_DEF | back to summary |
|---|---|
| pack-priv static final String STR_SET_GLOBAL_DEF | |
| STR_SET_GLOBAL_DEF_SUP | back to summary |
|---|---|
| pack-priv static final String STR_SET_GLOBAL_DEF_SUP | |
| STR_SET_THREAD_DEF | back to summary |
|---|---|
| pack-priv static final String STR_SET_THREAD_DEF | |
| STR_SET_THREAD_DEF_SUP | back to summary |
|---|---|
| pack-priv static final String STR_SET_THREAD_DEF_SUP | |
| ContextPermission | back to summary |
|---|---|
| public ContextPermission(final String name, final String actions) Constructs a permission with the specified name. | |
| ContextPermission | back to summary |
|---|---|
| pack-priv ContextPermission(final String name, final int actionBits) | |
| equals | back to summary |
|---|---|
| public boolean equals(final Object obj) Implements abstract java. Determine if this permission is equal to the given object.
| |
| equals | back to summary |
|---|---|
| public boolean equals(final ContextPermission permission) Determine if this permission is equal to the given permission.
| |
| getActionBits | back to summary |
|---|---|
| pack-priv int getActionBits() | |
| getActions | back to summary |
|---|---|
| public String getActions() Implements abstract java. Get the actions string. This string will be returned in a canonical format.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Implements abstract java. Get the hash code of this permission.
| |
| implies | back to summary |
|---|---|
| public boolean implies(final Permission permission) Implements abstract java. Determine if the given permission is implied by this permission.
| |
| implies | back to summary |
|---|---|
| public boolean implies(final ContextPermission permission) Determine if the given permission is implied by this permission.
| |
| impliesName | back to summary |
|---|---|
| private boolean impliesName(String otherName) | |
| isSet | back to summary |
|---|---|
| pack-priv static boolean isSet(int mask, int test) | |
| newPermissionCollection | back to summary |
|---|---|
| public PermissionCollection newPermissionCollection() Overrides java. Get a new permission collection instance which can hold this type of permissions.
| |
| parseAction | back to summary |
|---|---|
| private static int parseAction(final String action) | |
| parseActions | back to summary |
|---|---|
| private static int parseActions(final String actions) throws IllegalArgumentException | |
| withActionBits | back to summary |
|---|---|
| pack-priv ContextPermission withActionBits(int actionBits) | |
| withActions | back to summary |
|---|---|
| public ContextPermission withActions(String actions) Create a copy of this permission with the additional given actions.
| |
| withoutActionBits | back to summary |
|---|---|
| pack-priv ContextPermission withoutActionBits(final int actionBits) | |
| withoutActions | back to summary |
|---|---|
| public ContextPermission withoutActions(String actions) Create a copy of this permission without any of the given actions.
| |