java.security.AccessController Maven / Gradle / Ivy
package java.security;
public final class AccessController {
private AccessController() {
}
public static T doPrivileged(PrivilegedAction action) {
return action.run();
}
public static T doPrivileged(PrivilegedExceptionAction action) throws PrivilegedActionException {
try {
return action.run();
} catch (Exception e) {
throw new PrivilegedActionException(e);
}
}
public static T doPrivilegedWithCombiner(PrivilegedAction action) {
return doPrivileged(action);
}
public static T doPrivileged(PrivilegedAction action, AccessControlContext context) {
return doPrivileged(action);
}
public static T doPrivileged(PrivilegedAction action, AccessControlContext context, Permission... perms) {
return doPrivileged(action);
}
public static T doPrivilegedWithCombiner(PrivilegedAction action, AccessControlContext context, Permission... perms) {
return doPrivileged(action);
}
public static T doPrivilegedWithCombiner(PrivilegedExceptionAction action) throws PrivilegedActionException {
return doPrivileged(action);
}
public static T doPrivileged(PrivilegedExceptionAction action, AccessControlContext context) throws PrivilegedActionException {
return doPrivileged(action);
}
public static T doPrivileged(PrivilegedExceptionAction action, AccessControlContext context, Permission... perms) throws PrivilegedActionException {
return doPrivileged(action);
}
public static T doPrivilegedWithCombiner(PrivilegedExceptionAction action, AccessControlContext context, Permission... perms) throws PrivilegedActionException {
return doPrivileged(action);
}
public static AccessControlContext getContext() {
return null;
}
public static void checkPermission(Permission perm) throws AccessControlException {
}
}