Stay organized with collections Save and categorize content based on your preferences.
Guard
public interface Guard
Known indirect subclasses AllPermission, AuthPermission, BasicPermission, FilePermission, LinkPermission, LoggingPermission, NetPermission, Permission, PrivateCredentialPermission, PropertyPermission, ReflectPermission, RuntimePermission, SQLPermission, SSLPermission, SecurityPermission, SerializablePermission, SocketPermission, UnresolvedPermission |
This interface represents a guard, which is an object that is used to protect access to another object.
This interface contains a single method, checkGuard
, with a single object
argument. checkGuard
is invoked (by the GuardedObject getObject
method) to determine whether or not to allow access to the object.
Summary
Public methods |
abstract void | checkGuard(Object object) Determines whether or not to allow access to the guarded object object . |
Public methods
checkGuard
public abstract void checkGuard (Object object)
Determines whether or not to allow access to the guarded object object
. Returns silently if access is allowed. Otherwise, throws a SecurityException.
Parameters |
object | Object : the object being protected by the guard. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[]]