15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.security;
27
28 import java.util.ArrayList;
29 import java.util.Collections;
30 import java.util.Enumeration;
31 import java.util.List;
32 import java.util.Map;
33 import java.util.Objects;
34 import java.util.WeakHashMap;
35 import jdk.internal.misc.JavaSecurityAccess;
36 import jdk.internal.misc.SharedSecrets;
37 import sun.security.action.GetPropertyAction;
38 import sun.security.provider.PolicyFile;
39 import sun.security.util.Debug;
40 import sun.security.util.FilePermCompat;
41 import sun.security.util.SecurityConstants;
42
43 /**
44 * The ProtectionDomain class encapsulates the characteristics of a domain,
45 * which encloses a set of classes whose instances are granted a set
46 * of permissions when being executed on behalf of a given set of Principals.
47 * <p>
48 * A static set of permissions can be bound to a ProtectionDomain when it is
49 * constructed; such permissions are granted to the domain regardless of the
50 * Policy in force. However, to support dynamic security policies, a
51 * ProtectionDomain can also be constructed such that it is dynamically
52 * mapped to a set of permissions by the current Policy whenever a permission
53 * is checked.
54 *
55 * @author Li Gong
56 * @author Roland Schemers
|
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 package java.security;
27
28 import java.util.ArrayList;
29 import java.util.Collections;
30 import java.util.Enumeration;
31 import java.util.List;
32 import java.util.Map;
33 import java.util.Objects;
34 import java.util.WeakHashMap;
35 import jdk.internal.access.JavaSecurityAccess;
36 import jdk.internal.access.SharedSecrets;
37 import sun.security.action.GetPropertyAction;
38 import sun.security.provider.PolicyFile;
39 import sun.security.util.Debug;
40 import sun.security.util.FilePermCompat;
41 import sun.security.util.SecurityConstants;
42
43 /**
44 * The ProtectionDomain class encapsulates the characteristics of a domain,
45 * which encloses a set of classes whose instances are granted a set
46 * of permissions when being executed on behalf of a given set of Principals.
47 * <p>
48 * A static set of permissions can be bound to a ProtectionDomain when it is
49 * constructed; such permissions are granted to the domain regardless of the
50 * Policy in force. However, to support dynamic security policies, a
51 * ProtectionDomain can also be constructed such that it is dynamically
52 * mapped to a set of permissions by the current Policy whenever a permission
53 * is checked.
54 *
55 * @author Li Gong
56 * @author Roland Schemers
|