public final class AccessControlContext extends Object
Constructor and Description |
---|
AccessControlContext(AccessControlContext acc,
DomainCombiner combiner)
Construct a new AccessControlContext with the specified
ProtectionDomain s and DomainCombiner . |
AccessControlContext(ProtectionDomain[] context)
Construct a new AccessControlContext with the specified
ProtectionDomains.
|
Modifier and Type | Method and Description |
---|---|
void |
checkPermission(Permission perm)
Determines whether or not the specific permission is granted
depending on the context it is within.
|
boolean |
equals(Object obj)
Checks if two AccessControlContexts are equal.
|
DomainCombiner |
getDomainCombiner()
Returns the Domain Combiner associated with the AccessControlContext
|
int |
hashCode()
Computes a hash code of this class
|
public AccessControlContext(ProtectionDomain[] context)
context
must not be
null and duplicates will be removed.context
- The ProtectionDomains to usepublic AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
ProtectionDomain
s and DomainCombiner
.
Code calling this constructor must have a SecurityPermission
of createAccessControlContext.
SecurityException
- If the caller does not have permission
to create an access control context.public DomainCombiner getDomainCombiner()
public void checkPermission(Permission perm) throws AccessControlException
perm
- a permission to checkAccessControlException
- if the permssion is not permittedpublic boolean equals(Object obj)
equals
in class Object
obj
- The object to compare this class toObject.hashCode()
public int hashCode()
hashCode
in class Object
Object.equals(Object)
,
System.identityHashCode(Object)