java.security
public
abstract
class
java.security.BasicPermission
Superclass of permissions which have names but no action lists.
Known Direct Subclasses
AudioPermission,
AuthPermission,
LoggingPermission,
NetPermission,
PropertyPermission,
ReflectPermission,
RuntimePermission,
SQLPermission,
SSLPermission,
SecurityPermission,
SerializablePermission
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
public
BasicPermission(String name)
Creates an instance of this class with the given name and action list.
Parameters
| name
| String the name of the new permission.
|
public
BasicPermission(String name, String action)
Creates an instance of this class with the given name and action list.
The action list is ignored.
Parameters
| name
| String the name of the new permission. |
| action
| String ignored.
|
Public Methods
public
boolean
equals(Object obj)
Compares the argument to the receiver, and answers true if they represent
the
same object using a class specific comparison. In this
case, the receiver and the object must have the same class and name.
Parameters
| obj
| the object to compare with this object |
Returns
true if the object is the same as this object
false if it is different from this object
public
String
getActions()
Answers the actions associated with the receiver. BasicPermission objects
have no actions, so answer the empty string.
Returns
- String the actions associated with the receiver.
public
int
hashCode()
Answers an integer hash code for the receiver. Any two objects which
answer
true when passed to
equals must
answer the same value for this method.
public
boolean
implies(Permission permission)
Indicates whether the argument permission is implied by the receiver.
Parameters
| permission
| java.security.Permission the permission to check
|
Returns
- boolean
true if the argument permission is implied
by the receiver, and false if it is not.
Answers a new PermissionCollection for holding permissions of this class.
Answer null if any permission collection can be used.
Note: For BasicPermission (and subclasses which do not override this
method), the collection which is returned does not invoke the
.implies 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.
Returns
- a new PermissionCollection or null
See Also
- BasicPermissionCollection