The checkClass method of the PolicyEngine Class contains the following signatures:
checkClass(Class cls,PermissionID pid)
checkClass(Class cls,String pname)
checkClass(Class cls,PermissionID pid,Object sreq)
checkClass(Class cls,ISecurityRequest sreq)
Performs a security check directly against a specified class. If the class does not possess the specified type of permission, a SecurityException is thrown.
public static void checkClass(Class cls,PermissionID pid);
cls | The class to check against. |
pid | The type of permission to check for. |
SecurityException if the security check fails.
Performs a security check directly against a specified class. If the class does not possess the specified type of permission, a SecurityException is thrown. The permission type is specified as a permission name (instead of a PermissionID object).
public static void checkClass(Class cls,String pname);
cls | The class to check against. |
pname | The name of the permission to check for. |
SecurityException if the security check fails.
Performs a security check directly against a specified class. The class must possess the specified type of permission, and the parameterized check against the class's associated permission object must pass, or a SecurityException is thrown.
public static void checkClass(Class cls,PermissionID pid,Object sreq);
cls | The class to check against. |
pid | The type of permission to check for. |
sreq | The security request object. |
SecurityException if the security check fails.
Performs a security check directly against a specified class. The class must possess the specified type of permission, and the parameterized check against the class's associated permission object must pass, or a SecurityException is thrown.
public static void checkClass(Class cls,ISecurityRequest sreq);
cls | The class to check against. |
sreq | The object that determines the type of permission to check for and also represents the security request object. |
This method is a variation on the checkClass(Class,PermissionID,Object) method, where the ISecurityRequest object is used to determine the permission type, and is also used as the permission request object.
SecurityException if the security check fails.