java.security
public
abstract
class
java.security.Permission
Abstract superclass of all classes which represent permission to access
system resources.
Known Direct Subclasses
Known Indirect 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
Permission(String name)
Constructs a new instance of this class with its name set to the
argument.
Parameters
| name
| String the name of the permission.
|
Public Methods
public
void
checkGuard(Object obj)
public
abstract
boolean
equals(Object obj)
Compares the argument to the receiver, and answers true if they represent
the
same object using a class specific comparison. The
implementation in Object answers true only if the argument is the exact
same object as the receiver (==).
Parameters
| obj
| Object the object to compare with this object. |
public
abstract
String
getActions()
Answers the actions associated with the receiver. Subclasses should
return their actions in canonical form. If no actions are associated with
the receiver, the empty string should be returned.
Returns
- String the receiver's actions.
public
final
String
getName()
Answers the name of the receiver.
Returns
- String the receiver's name.
public
abstract
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
abstract
boolean
implies(Permission permission)
Indicates whether the argument permission is implied by the receiver.
Parameters
| permission
| 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.
Returns
- PermissionCollection or null a suitable permission collection for
instances of the class of the receiver.
public
String
toString()
Answers a string containing a concise, human-readable description of the
receiver.
Returns
- String a printable representation for the receiver.