java.lang.Object | ||
↳ | java.security.Permission | |
↳ | java.security.BasicPermission |
Known Direct Subclasses |
BasicPermission
is the common base class of all permissions which
have a name but no action lists. A BasicPermission
is granted or it
is not.
Names of a BasicPermission follow the dot separated, hierarchical property naming convention. Asterisk '*' can be used as wildcards. Either by itself, matching anything, or at the end of the name, immediately preceded by a '.'. For example:
java.io.* grants all permissions under the java.io permission hierarchy * grants all permissions
While this class ignores the action list in the
BasicPermission(String, String)
constructor, subclasses may
implement actions on top of this class.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Constructs a new instance of
BasicPermission with the specified
name. | |||||||||||
Constructs a new instance of
BasicPermission with the specified
name. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Compares the specified object with this
BasicPermission for
equality. | |||||||||||
Returns the actions associated with this permission.
| |||||||||||
Returns the hash code value for this
BasicPermission . | |||||||||||
Indicates whether the specified permission is implied by this permission.
| |||||||||||
Returns an empty
PermissionCollection for holding permissions. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class java.security.Permission
| |||||||||||
From class java.lang.Object
| |||||||||||
From interface java.security.Guard
|
Constructs a new instance of BasicPermission
with the specified
name.
name | the name of the permission. |
---|
NullPointerException | if name is null . |
---|---|
IllegalArgumentException | if name.length() == 0 .
|
Constructs a new instance of BasicPermission
with the specified
name. The action
parameter is ignored.
name | the name of the permission. |
---|---|
action | is ignored. |
NullPointerException | if name is null . |
---|---|
IllegalArgumentException | if name.length() == 0 .
|
Compares the specified object with this BasicPermission
for
equality. Returns true
if the specified object has the same class
and the two Permissions
s have the same name.
The implies(Permission)
method should be used for making access
control checks.
obj | object to be compared for equality with this BasicPermission . |
---|
true
if the specified object is equal to this BasicPermission
, otherwise false
.
Returns the actions associated with this permission. Since BasicPermission
instances have no actions, an empty string is returned.
Returns the hash code value for this BasicPermission
. Returns the
same hash code for BasicPermission
s that are equal to each other
as required by the general contract of hashCode()
.
BasicPermission
.Indicates whether the specified permission is implied by this permission.
permission | the permission to check against this permission. |
---|
true
if the specified permission is implied by this
permission, false
otherwise.
Returns an empty PermissionCollection
for holding permissions.
For PermissionCollection
(and subclasses which do not override
this method), the collection which is returned does not invoke
the implies(Permission)
method of the permissions which are
stored in it when checking if the collection implies a permission.
Instead, it assumes that if the type of the permission is correct, and
the name of the permission is correct, there is a match.
PermissionCollection
for holding permissions.