Additional top-level class in compilation unit: BasicPermissionCollection.
BasicPermission
class extends the Permission
class, and
can be used as the base class for permissions that want to
follow the same naming convention as BasicPermission
.
The name for a BasicPermission
is the name of the given permission
(for example, "exit",
"setFactory", "print.queueJob", etc.). The naming
convention follows the hierarchical property naming convention.
An asterisk may appear by itself, or if immediately preceded by a "."
may appear at the end of the name, to signify a wildcard match.
For example, "*" and "java.*" signify a wildcard match, while "*java", "a*b",
and "java*" do not.
The action string (inherited from Permission
) is unused.
Thus, BasicPermission
is commonly used as the base class for
"named" permissions
(ones that contain a name but no actions list; you either have the
named permission or you don't.)
Subclasses may implement actions on top of BasicPermission
,
if desired.
java.security.Permission
, java.security.Permissions
, java.security.PermissionCollection
, java.lang.SecurityManager
Modifier and Type | Field and Description |
---|---|
private transient boolean | |
private transient String | |
private static final long | |
private transient boolean |
Access | Constructor and Description |
---|---|
public | BasicPermission(String
the name of the name)BasicPermission .Creates a new |
public | BasicPermission(String
the name of the name, String BasicPermission .ignored. actions)Creates a new |
Modifier and Type | Method and Description |
---|---|
public boolean | Returns: true if obj 's class is the same as this
object's class and has the same name as this BasicPermission
object, false otherwise.the object we are testing for equality with this object. obj)Implements abstract java. Checks two |
public String | Returns: the empty string "".Implements abstract java. Returns the canonical string representation of the actions,
which currently is the empty string "", since there are no actions for
a |
pack-priv final String | Returns: the canonical name of thisBasicPermission .Returns the canonical name of this |
public int | Returns: the hash code value for this objectImplements abstract java. Returns the hash code value for this object. |
public boolean | Returns: true if the passed permission is equal to or
implied by this permission, false otherwise.the permission to check against. p)Implements abstract java. Checks if the specified permission is "implied" by this object. |
private void | |
public PermissionCollection | Returns: a newPermissionCollection object suitable for
storing BasicPermission objects.Overrides java. Returns a new |
private void | readObject(ObjectInputStream
the s)ObjectInputStream from which data is read
|
exitVM | back to summary |
---|---|
private transient boolean exitVM |
path | back to summary |
---|---|
private transient String path |
serialVersionUID | back to summary |
---|---|
private static final long serialVersionUID Hides java. |
wildcard | back to summary |
---|---|
private transient boolean wildcard |
BasicPermission | back to summary |
---|---|
public BasicPermission(String name) Creates a new
|
BasicPermission | back to summary |
---|---|
public BasicPermission(String name, String actions) Creates a new
|
equals | back to summary |
---|---|
public boolean equals(Object obj) Implements abstract java. Checks two |
getActions | back to summary |
---|---|
public String getActions() Implements abstract java. Returns the canonical string representation of the actions,
which currently is the empty string "", since there are no actions for
a |
getCanonicalName | back to summary |
---|---|
pack-priv final String getCanonicalName() Returns the canonical name of this
|
hashCode | back to summary |
---|---|
public int hashCode() Implements abstract java. Returns the hash code value for this object.
The hash code used is the hash code of the name, that is,
|
implies | back to summary |
---|---|
public boolean implies(Permission p) Implements abstract java. Checks if the specified permission is "implied" by this object.
More specifically, this method returns
|
init | back to summary |
---|---|
private void init(String name) initialize a |
newPermissionCollection | back to summary |
---|---|
public PermissionCollection newPermissionCollection() Overrides java. Returns a new
|
readObject | back to summary |
---|---|
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
|