public final class AccessControlContext extends Object
Constructor and Description |
---|
AccessControlContext(AccessControlContext acc,
DomainCombiner combiner)
Constructs a new instance of this class given a context
and a DomainCombiner
|
AccessControlContext(ProtectionDomain[] fromContext)
Constructs a new instance of this class given an array of
protection domains.
|
Modifier and Type | Method and Description |
---|---|
void |
checkPermission(Permission perm)
Checks if the permission
perm is allowed in this context. |
boolean |
equals(Object o)
Compares the argument to the receiver, and answers true
if they represent the same object using a class
specific comparison.
|
DomainCombiner |
getDomainCombiner()
Answers the DomainCombiner for the receiver.
|
int |
hashCode()
Answers an integer hash code for the receiver.
|
public AccessControlContext(ProtectionDomain[] fromContext)
fromContext
- the array of ProtectionDomainNullPointerException
- if fromContext is nullpublic AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
acc
- the AccessControlContextcombiner
- the DomainCombinerAccessControlException
- thrown
when the caller doesn't have the "createAccessControlContext" SecurityPermissionNullPointerException
- if the provided context is null.public void checkPermission(Permission perm) throws AccessControlException
perm
is allowed in this context.
All ProtectionDomains must grant the permission for it to be granted.perm
- java.security.Permission
the permission to checkAccessControlException
- thrown when perm is not granted.NullPointerException
- if perm is nullpublic boolean equals(Object o)
equals
in class Object
o
- the object to compare with this objecttrue
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 Object
equals(java.lang.Object)
public DomainCombiner getDomainCombiner()
AccessControlException
- thrown
when the caller doesn't have the "getDomainCombiner" SecurityPermissionEclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 1993, 2025 IBM Corp. and others.