src/java.base/share/classes/java/security/ProtectionDomain.java

Print this page




  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.lang.ref.Reference;
  29 import java.lang.ref.ReferenceQueue;
  30 import java.lang.ref.WeakReference;
  31 import java.util.ArrayList;
  32 import java.util.Enumeration;
  33 import java.util.List;
  34 import java.util.Map;
  35 import java.util.WeakHashMap;
  36 import java.util.concurrent.ConcurrentHashMap;
  37 import sun.misc.JavaSecurityAccess;
  38 import sun.misc.JavaSecurityProtectionDomainAccess;
  39 import static sun.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
  40 import sun.misc.SharedSecrets;
  41 import sun.security.util.Debug;
  42 import sun.security.util.SecurityConstants;
  43 
  44 /**
  45  * The ProtectionDomain class encapsulates the characteristics of a domain,
  46  * which encloses a set of classes whose instances are granted a set
  47  * of permissions when being executed on behalf of a given set of Principals.
  48  * <p>
  49  * A static set of permissions can be bound to a ProtectionDomain when it is
  50  * constructed; such permissions are granted to the domain regardless of the
  51  * Policy in force. However, to support dynamic security policies, a
  52  * ProtectionDomain can also be constructed such that it is dynamically
  53  * mapped to a set of permissions by the current Policy whenever a permission
  54  * is checked.
  55  *
  56  * @author Li Gong
  57  * @author Roland Schemers
  58  * @author Gary Ellison
  59  */
  60 




  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.lang.ref.Reference;
  29 import java.lang.ref.ReferenceQueue;
  30 import java.lang.ref.WeakReference;
  31 import java.util.ArrayList;
  32 import java.util.Enumeration;
  33 import java.util.List;
  34 import java.util.Map;
  35 import java.util.WeakHashMap;
  36 import java.util.concurrent.ConcurrentHashMap;
  37 import jdk.internal.misc.JavaSecurityAccess;
  38 import jdk.internal.misc.JavaSecurityProtectionDomainAccess;
  39 import static jdk.internal.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache;
  40 import jdk.internal.misc.SharedSecrets;
  41 import sun.security.util.Debug;
  42 import sun.security.util.SecurityConstants;
  43 
  44 /**
  45  * The ProtectionDomain class encapsulates the characteristics of a domain,
  46  * which encloses a set of classes whose instances are granted a set
  47  * of permissions when being executed on behalf of a given set of Principals.
  48  * <p>
  49  * A static set of permissions can be bound to a ProtectionDomain when it is
  50  * constructed; such permissions are granted to the domain regardless of the
  51  * Policy in force. However, to support dynamic security policies, a
  52  * ProtectionDomain can also be constructed such that it is dynamically
  53  * mapped to a set of permissions by the current Policy whenever a permission
  54  * is checked.
  55  *
  56  * @author Li Gong
  57  * @author Roland Schemers
  58  * @author Gary Ellison
  59  */
  60