public interface Guard
| java.security.Guard |
这个接口表示一个警卫,它是一个用来保护对另一个对象的访问的对象。
该接口包含一个方法checkGuard ,其中包含一个object参数。 调用checkGuard (由GuardedObject getObject方法)来确定是否允许访问该对象。
也可以看看:
Public methods |
|
|---|---|
abstract void |
checkGuard(Object object) 确定是否允许访问保护对象 |
void checkGuard (Object object)
确定是否允许访问保护对象object 。 如果允许访问,则默认返回。 否则,会引发SecurityException。
| Parameters | |
|---|---|
object |
Object: the object being protected by the guard. |
| Throws | |
|---|---|
SecurityException |
if access is denied. |