| java.lang.Object java.security.Permission java.security.BasicPermission
All known Subclasses: java.lang.reflect.ReflectPermission, java.security.SecurityPermission, java.util.PropertyPermission, java.net.NetPermission, java.lang.management.ManagementPermission, java.util.logging.LoggingPermission, java.io.SerializablePermission, java.awt.AWTPermission, java.sql.SQLPermission,
BasicPermission | abstract public class BasicPermission extends Permission implements Serializable(Code) | | Superclass of permissions which have names but no action lists.
|
Constructor Summary | |
public | BasicPermission(String name) Creates an instance of this class with the given name and action list. | public | BasicPermission(String name, String action) Creates an instance of this class with the given name and action list. |
Method Summary | |
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. | public String | getActions() Answers the actions associated with the receiver. | public int | hashCode() Answers an integer hash code for the receiver. | public boolean | implies(Permission permission) Indicates whether the argument permission is implied by the receiver. | static boolean | nameImplies(String thisName, String thatName) Checks if thisName implies thatName ,
accordingly to hierarchical property naming convention. | public PermissionCollection | newPermissionCollection() 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. |
BasicPermission | public BasicPermission(String name)(Code) | | Creates an instance of this class with the given name and action list.
Parameters: name - String the name of the new permission. |
BasicPermission | public BasicPermission(String name, String action)(Code) | | 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. Parameters: action - String ignored. |
equals | public boolean equals(Object obj)(Code) | | 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 true if the object is the same as this objectfalse if it is different from this object See Also: BasicPermission.hashCode |
getActions | public String getActions()(Code) | | Answers the actions associated with the receiver. BasicPermission objects
have no actions, so answer the empty string.
String the actions associated with the receiver. |
hashCode | public int hashCode()(Code) | | 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.
int the receiver's hash See Also: BasicPermission.equals |
implies | public boolean implies(Permission permission)(Code) | | Indicates whether the argument permission is implied by the receiver.
boolean true if the argument permission is impliedby the receiver, and false if it is not. Parameters: permission - java.security.Permission the permission to check |
nameImplies | static boolean nameImplies(String thisName, String thatName)(Code) | | Checks if thisName implies thatName ,
accordingly to hierarchical property naming convention.
It is assumed that names cannot be null or empty.
|
newPermissionCollection | public PermissionCollection newPermissionCollection()(Code) | | 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.
a new PermissionCollection or null See Also: java.security.BasicPermissionCollection |
|
|