public interface Guard
这个接口表示一个守护,它是一个用来保护对另一个对象的访问的对象。
该接口包含一个单一的方法,checkGuard
,与一个单一的object
论点。checkGuard
调用(由guardedobject getObject
法)来决定是否允许访问对象。
GuardedObject
Modifier and Type | Method and Description |
---|---|
void |
checkGuard(Object object)
确定是否允许访问受保护的对象
object 。
|
void checkGuard(Object object) throws SecurityException
object
。如果允许访问,则返回。否则,抛出SecurityException。
object
被保卫的对象。
SecurityException
如果访问被拒绝。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.