public class GetBooleanAction
extends java.lang.Object
implements java.security.PrivilegedAction<java.lang.Boolean>
An instance of this class can be used as the argument of
AccessController.doPrivileged.
The following code retrieves the boolean value of the system
property named "prop" as a privileged action:
boolean b = java.security.AccessController.doPrivileged
(new GetBooleanAction("prop")).booleanValue();
PrivilegedAction,
AccessController| Constructor and Description |
|---|
GetBooleanAction(java.lang.String theProp)
Constructor that takes the name of the system property whose boolean
value needs to be determined.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Boolean |
run()
Determines the boolean value of the system property whose name was
specified in the constructor.
|
Copyright © 2020. All Rights Reserved.