public final class ExecOptionPermission extends Permission
"literal"
literal*
literal{fpname}
string
A target name is parsed according to the first form (in the order given
above) that it matches. A literal is zero or more arbitrary
characters. An fpname is zero or more characters, none of which
are '{'. A string is zero or more arbitrary characters that do
not match any of the previous forms.
An option option matches a target name of the form "literal" if option is equal to literal.
An option option matches a target name of the form literal* if option starts with literal.
An option option matches a target name of the form
literal{fpname} if option starts with
literal and the remainder of option matches fpname
according to the matching semantics defined by FilePermission;
that is, if a FilePermission created with target name
fpname (and some actions) implies a FilePermission
created with the remainder of option (and the same actions).
An option option matches a target name of the form string if option is equal to string.
| Modifier and Type | Field and Description |
|---|---|
private Permission |
fp |
private boolean |
plain
true if the name ended with a wildcard or fpname, false otherwise
|
private String |
prefix
the name without any wildcard or fpname on the end
|
private static long |
serialVersionUID |
| Constructor and Description |
|---|
ExecOptionPermission(String name)
Constructs an instance with the specified name.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj)
Two instances of this class are equal if each implies the other;
that is, every option that matches the name of one instance matches
the name of the other instance.
|
String |
getActions()
Returns the empty string.
|
int |
hashCode()
Returns a hash code value for this object.
|
boolean |
implies(Permission p)
Returns
true if the specified permission is an instance
of ExecOptionPermission and every option that matches
the name of specified permission also matches the name of this
permission; returns false otherwise. |
private void |
init(String name)
Parses the target name and initializes the transient fields.
|
private void |
readObject(ObjectInputStream s)
Recreates any transient state.
|
checkGuard, getName, newPermissionCollection, toStringprivate static final long serialVersionUID
private transient String prefix
private transient boolean plain
private transient Permission fp
public ExecOptionPermission(String name)
name - the target nameNullPointerException - if the name is nullprivate void init(String name)
public boolean implies(Permission p)
true if the specified permission is an instance
of ExecOptionPermission and every option that matches
the name of specified permission also matches the name of this
permission; returns false otherwise.implies in class Permissionp - the permission to checktrue if the specified permission is an instance
of ExecOptionPermission and every option that matches
the name of specified permission also matches the name of this
permission; false otherwisepublic boolean equals(Object obj)
equals in class Permissionpublic int hashCode()
hashCode in class Permissionpublic String getActions()
getActions in class Permissionprivate void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException
InvalidObjectException - if the target name is nullIOExceptionClassNotFoundExceptionCopyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.