public class AccessPermission extends Permission
* Identifier *Suffix Identifier* QualifiedIdentifier.* QualifiedIdentifier.Identifier QualifiedIdentifier.*Suffix QualifiedIdentifier.Identifier*where QualifiedIdentifier and Identifier are as defined in The Java(TM) Language Specification except that whitespace is not permitted, and Suffix is defined to be one or more characters that may be part of an Identifier. These forms are defined to match fully qualified names of the form QualifiedIdentifier.Identifier as follows:
Target Name | QualifiedIdentifier Match | Identifier Match |
---|---|---|
* | any | any |
method | any | method |
*suffix | any | any ending with suffix |
prefix* | any | any starting with prefix |
type.* | type | any |
type.method | type | method |
type.*suffix | type | any ending with suffix |
type.prefix* | type | any starting with prefix |
This class, and simple subclasses of it, can be used (for example) with
net.jini.jeri.BasicInvocationDispatcher
. It is
recommended that a simple subclass of this class be defined for each
remote object implementation class that can be exported using an
net.jini.export.Exporter
, to allow separation of
grants in policy files.
Constructor and Description |
---|
AccessPermission(String name)
Creates an instance with the specified target name.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getActions() |
int |
hashCode() |
boolean |
implies(Permission perm)
Returns
true if every fully qualified name that
matches the specified permission's name also matches this
permission's name; returns false otherwise. |
checkGuard, getName, newPermissionCollection, toString
public AccessPermission(String name)
name
- the target nameNullPointerException
- if the target name is null
IllegalArgumentException
- if the target name does not match
the syntax specified in the comments at the beginning of this classpublic boolean implies(Permission perm)
true
if every fully qualified name that
matches the specified permission's name also matches this
permission's name; returns false
otherwise.implies
in class Permission
perm
- the permission to checktrue
if every fully qualified name that
matches the specified permission's name also matches this
permission's name; false
otherwisepublic boolean equals(Object obj)
equals
in class Permission
true
if the specified object is an instance
of the same class as this permission and has the same target name
as this permission; returns false
otherwise.public int hashCode()
hashCode
in class Permission
public String getActions()
getActions
in class Permission
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.