@Deprecated(since="17", forRemoval=true) public final class AccessControlContext extends Object
AccessControlContext was used with the Security Manager for access control decisions based on context that it encapsulated. This feature no longer exists.| Constructor | Description |
|---|---|
AccessControlContext |
Deprecated, for removal: This API element is subject to removal in a future version. Create a new AccessControlContext with the given AccessControlContext and DomainCombiner. |
AccessControlContext |
Deprecated, for removal: This API element is subject to removal in a future version. Create an AccessControlContext with the given array of ProtectionDomain objects. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
checkPermission |
Deprecated, for removal: This API element is subject to removal in a future version. Throws AccessControlException. |
boolean |
equals |
Deprecated, for removal: This API element is subject to removal in a future version. Checks two AccessControlContext objects for equality. |
DomainCombiner |
getDomainCombiner() |
Deprecated, for removal: This API element is subject to removal in a future version. Get the DomainCombiner associated with this AccessControlContext. |
int |
hashCode() |
Deprecated, for removal: This API element is subject to removal in a future version. Returns the hash code value for this context. |
public AccessControlContext(ProtectionDomain[] context)
AccessControlContext with the given array of ProtectionDomain objects. Context must not be null. Duplicate domains will be removed from the context.context - the ProtectionDomain objects associated with this context. The non-duplicate domains are copied from the array. Subsequent changes to the array will not affect this AccessControlContext.NullPointerException - if context is null
public AccessControlContext(AccessControlContext acc, DomainCombiner combiner)
AccessControlContext with the given AccessControlContext and DomainCombiner. This constructor associates the provided DomainCombiner with the provided AccessControlContext.acc - the AccessControlContext associated with the provided DomainCombiner.combiner - the DomainCombiner to be associated with the provided AccessControlContext.NullPointerException - if the provided context is null.public DomainCombiner getDomainCombiner()
DomainCombiner associated with this AccessControlContext.DomainCombiner associated with this AccessControlContext, or null if there is none.public void checkPermission(Permission perm) throws AccessControlException
AccessControlException.perm - ignoredAccessControlException - alwayspublic boolean equals(Object obj)
AccessControlContext objects for equality. Checks that obj is an AccessControlContext and has the same set of ProtectionDomain objects as this context.public int hashCode()
© 1993, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/security/AccessControlContext.html