Creates a new ProtectionDomain qualified by the given CodeSource, Permissions, ClassLoader and array of Principals. If the permissions object is not null, then
setReadOnly()
will be called on the passed in Permissions object.
The permissions granted to this domain are dynamic, i.e. invoking the staticPermissionsOnly()
method returns false. They include both the static permissions passed to this constructor, and any permissions granted to this domain by the current Policy at the time a permission is checked.
This constructor is typically used by ClassLoaders
and DomainCombiners
which delegate to Policy
to actively associate the permissions granted to this domain. This constructor affords the Policy provider the opportunity to augment the supplied PermissionCollection to reflect policy changes.