Taal

ProtectionDomain Constructors

Definition

Overloads

Name Description
ProtectionDomain(CodeSource, PermissionCollection)
ProtectionDomain(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

ProtectionDomain(CodeSource, PermissionCollection, ClassLoader, IPrincipal[])

ProtectionDomain(CodeSource, PermissionCollection)

[Android.Runtime.Register(".ctor", "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;)V", "")]
public ProtectionDomain(Java.Security.CodeSource? codesource, Java.Security.PermissionCollection? permissions);
[<Android.Runtime.Register(".ctor", "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;)V", "")>]
new Java.Security.ProtectionDomain : Java.Security.CodeSource * Java.Security.PermissionCollection -> Java.Security.ProtectionDomain

Parameters

codesource
CodeSource

the codesource associated with this domain

permissions
PermissionCollection

the permissions granted to this domain

Attributes

Remarks

Creates a new ProtectionDomain with the given CodeSource and permissions. If permissions is not null, then setReadOnly() will be called on the passed in permissions. The permissions granted to this domain are static, i.e. invoking the staticPermissionsOnly() method returns true. They contain only the ones passed to this constructor and the current policy will not be consulted.

Java reference for java.security.ProtectionDomain.ProtectionDomain.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ProtectionDomain(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected ProtectionDomain(IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Security.ProtectionDomain : nativeint * Android.Runtime.JniHandleOwnership -> Java.Security.ProtectionDomain

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

ProtectionDomain(CodeSource, PermissionCollection, ClassLoader, IPrincipal[])

[Android.Runtime.Register(".ctor", "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;Ljava/lang/ClassLoader;[Ljava/security/Principal;)V", "")]
public ProtectionDomain(Java.Security.CodeSource? codesource, Java.Security.PermissionCollection? permissions, Java.Lang.ClassLoader? classloader, Java.Security.IPrincipal[]? principals);
[<Android.Runtime.Register(".ctor", "(Ljava/security/CodeSource;Ljava/security/PermissionCollection;Ljava/lang/ClassLoader;[Ljava/security/Principal;)V", "")>]
new Java.Security.ProtectionDomain : Java.Security.CodeSource * Java.Security.PermissionCollection * Java.Lang.ClassLoader * Java.Security.IPrincipal[] -> Java.Security.ProtectionDomain

Parameters

codesource
CodeSource

the CodeSource associated with this domain

permissions
PermissionCollection

the permissions granted to this domain

classloader
ClassLoader

the ClassLoader associated with this domain

principals
IPrincipal[]

the array of Principal objects associated with this domain. The contents of the array are copied to protect against subsequent modification.

Attributes

Remarks

Creates a new ProtectionDomain qualified by the given CodeSource, permissions, ClassLoader and array of principals. If permissions is not null, then setReadOnly() will be called on the passed in permissions. 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 the Policy object 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.

Java reference for java.security.ProtectionDomain.ProtectionDomain.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to