public interface PrivilegedAction<T>
PrivilegedAction
对象上的PrivilegedAction
来执行AccessController.doPrivileged
。
此接口仅用于不抛出检查异常的计算;
抛出检查异常的计算必须使用PrivilegedExceptionAction
。
T run()
AccessController.doPrivileged
调用。
PrivilegedAction
每个类应该记录这个值代表什么(如果有的话)。
AccessController.doPrivileged(PrivilegedAction)
,
AccessController.doPrivileged(PrivilegedAction, AccessControlContext)
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.