Creates a new ProtectionDomain qualified by the given CodeSource,
Permissions, ClassLoader and array of Principals.
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; 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.
Parameters:
- codesource - the CodeSource associated with this domain
- permissions - the permissions granted to this domain
- classloader - the ClassLoader associated with this domain
- principals - the array of Principals associated with this
domain. The contents of the array are copied to protect against
subsequent modification.
Since:
1.4
See Also:
Policy.refresh()
,
Policy.getPermissions(ProtectionDomain)
,