Subject.GetPrincipals(Class) Method

Definition

Return a Set of Principals associated with this Subject that are instances or subclasses of the specified Class.

[Android.Runtime.Register("getPrincipals", "(Ljava/lang/Class;)Ljava/util/Set;", "")]
[Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.security.Principal" })]
public System.Collections.ICollection? GetPrincipals (Java.Lang.Class? c);
[<Android.Runtime.Register("getPrincipals", "(Ljava/lang/Class;)Ljava/util/Set;", "")>]
[<Java.Interop.JavaTypeParameters(new System.String[] { "T extends java.security.Principal" })>]
member this.GetPrincipals : Java.Lang.Class -> System.Collections.ICollection

Parameters

c
Class

the returned Set of Principals will all be instances of this class.

Returns

a Set of Principals that are instances of the specified Class.

Attributes

Remarks

Return a Set of Principals associated with this Subject that are instances or subclasses of the specified Class.

The returned Set is not backed by this Subject's internal PrincipalSet. A new Set is created and returned for each method invocation. Modifications to the returned Set will not affect the internal PrincipalSet.

Java documentation for javax.security.auth.Subject.getPrincipals(java.lang.Class<T>).

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