Most visited

Recently visited

Added in API level 1

AccessController

public final class AccessController
extends Object

java.lang.Object
   ↳ java.security.AccessController


旧版安全代码; 不使用。

Summary

Public methods

static void checkPermission(Permission perm)
static <T> T doPrivileged(PrivilegedExceptionAction<T> action, AccessControlContext context)

致电 action.run()

static <T> T doPrivileged(PrivilegedExceptionAction<T> action)

致电 action.run()

static <T> T doPrivileged(PrivilegedAction<T> action)

致电 action.run()

static <T> T doPrivileged(PrivilegedAction<T> action, AccessControlContext context)

致电 action.run()

static <T> T doPrivilegedWithCombiner(PrivilegedAction<T> action)

致电 action.run()

static <T> T doPrivilegedWithCombiner(PrivilegedExceptionAction<T> action)

致电 action.run()

static AccessControlContext getContext()

Inherited methods

From class java.lang.Object

Public methods

checkPermission

Added in API level 1
void checkPermission (Permission perm)

Parameters
perm Permission
Throws
AccessControlException

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedExceptionAction<T> action, 
                AccessControlContext context)

致电 action.run()

Parameters
action PrivilegedExceptionAction
context AccessControlContext
Returns
T
Throws
PrivilegedActionException

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedExceptionAction<T> action)

致电 action.run()

Parameters
action PrivilegedExceptionAction
Returns
T
Throws
PrivilegedActionException

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedAction<T> action)

致电 action.run()

Parameters
action PrivilegedAction
Returns
T

doPrivileged

Added in API level 1
T doPrivileged (PrivilegedAction<T> action, 
                AccessControlContext context)

致电 action.run()

Parameters
action PrivilegedAction
context AccessControlContext
Returns
T

doPrivilegedWithCombiner

Added in API level 9
T doPrivilegedWithCombiner (PrivilegedAction<T> action)

致电 action.run()

Parameters
action PrivilegedAction
Returns
T

doPrivilegedWithCombiner

Added in API level 9
T doPrivilegedWithCombiner (PrivilegedExceptionAction<T> action)

致电 action.run()

Parameters
action PrivilegedExceptionAction
Returns
T
Throws
PrivilegedActionException

getContext

Added in API level 1
AccessControlContext getContext ()

Returns
AccessControlContext

Hooray!