|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.security.Permission
java.security.BasicPermission
public abstract class BasicPermission
Superclass of permissions which have names but no action lists.
| Constructor Summary | |
|---|---|
BasicPermission(String name)
Creates an instance of this class with the given name and action list. |
|
BasicPermission(String name,
String action)
Creates an instance of this class with the given name and action list. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. |
String |
getActions()
Returns the actions associated with the receiver. |
int |
hashCode()
Returns an integer hash code for the receiver. |
boolean |
implies(Permission permission)
Indicates whether the argument permission is implied by the receiver. |
(package private) static boolean |
nameImplies(String thisName,
String thatName)
Checks if thisName implies thatName,
accordingly to hierarchical property naming convention. |
PermissionCollection |
newPermissionCollection()
Returns a new PermissionCollection for holding permissions of this class. |
| Methods inherited from class java.security.Permission |
|---|
checkGuard, getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BasicPermission(String name)
name - String the name of the new permission.
public BasicPermission(String name,
String action)
name - String the name of the new permission.action - String ignored.| Method Detail |
|---|
public boolean equals(Object obj)
equals in class Permissionobj - the object to compare with this object
true if the object is the same as this object
false if it is different from this objecthashCode()public int hashCode()
true when passed to equals must
answer the same value for this method.
hashCode in class Permissionequals(java.lang.Object)public String getActions()
getActions in class Permissionpublic boolean implies(Permission permission)
implies in class Permissionpermission - java.security.Permission the permission to check
true if the argument permission is implied
by the receiver, and false if it is not.
static boolean nameImplies(String thisName,
String thatName)
thisName implies thatName,
accordingly to hierarchical property naming convention.
It is assumed that names cannot be null or empty.
public PermissionCollection newPermissionCollection()
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.
newPermissionCollection in class PermissionBasicPermissionCollection
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||