語言

IUserPrincipal 介面

定義

A Principal 代表用來判定檔案系統中物件存取權限的身份。

[Android.Runtime.Register("java/nio/file/attribute/UserPrincipal", "", "Java.Nio.FileNio.Attributes.IUserPrincipalInvoker", ApiSince=26)]
public interface IUserPrincipal : IDisposable, Java.Interop.IJavaPeerable, Java.Security.IPrincipal
[<Android.Runtime.Register("java/nio/file/attribute/UserPrincipal", "", "Java.Nio.FileNio.Attributes.IUserPrincipalInvoker", ApiSince=26)>]
type IUserPrincipal = interface
    interface IPrincipal
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
衍生
屬性
實作

備註

A Principal 代表用來判定檔案系統中物件存取權限的身份。

在許多平台與檔案系統中,實體需要適當的存取權限或權限才能存取檔案系統中的物件。 存取權限通常是透過檢查實體的身份來執行。 例如,在使用 存取控制 Lists(ACL)強制權限分離的實作中,檔案系統中的檔案可能會有相關的 ACL,用以決定 ACL 中指定的身份的存取權限。

UserPrincipal物件是同一性的抽象表徵。 它通常代表 #getName() name 使用者名稱或帳號名稱。 使用者主物件可透過 UserPrincipalLookupService取得,或由 FileAttributeView 提供身份相關屬性存取的實作回傳。 例如,和 AclFileAttributeViewPosixFileAttributeView 提供對檔案 PosixFileAttributes#owner owner.

在 1.7 版本中加入。

的 java.nio.file.attribute.UserPrincipalJava 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

屬性

名稱 Description
Handle

取得底層 Android 物件的 JNI 值。

(繼承來源 IJavaObject)
JniIdentityHashCode

回傳包裹實例的 java.lang.System.identityHashCode() 值。

(繼承來源 IJavaPeerable)
JniManagedPeerState

管理貴族的狀況。

(繼承來源 IJavaPeerable)
JniObjectReferenceControlBlock

A Principal 代表用來判定檔案系統中物件存取權限的身份。

(繼承來源 IJavaPeerable)
JniPeerMembers

成員存取與召喚支援。

(繼承來源 IJavaPeerable)
Name

回傳這個 Principal名稱。

(繼承來源 IPrincipal)
PeerReference

回傳JniObjectReference包裹後的 Java 物件實例。

(繼承來源 IJavaPeerable)

方法

名稱 Description
Disposed()

當實例被處理後才被召喚。

(繼承來源 IJavaPeerable)
DisposeUnlessReferenced()

如果沒有未解決的參考資料,則 Dispose()呼叫;否則,則不做任何事。

(繼承來源 IJavaPeerable)
Equals(Object)

將此原則與指定物件進行比較。

(繼承來源 IPrincipal)
Finalized()

當實例完成後才會被通知。

(繼承來源 IJavaPeerable)
GetHashCode()

會回傳這個原則的雜湊碼。

(繼承來源 IPrincipal)
Implies(Subject)

若指定主體由此原則隱含,則返回為真。

(繼承來源 IPrincipal)
SetJniIdentityHashCode(Int32)

將回傳的值設為 JniIdentityHashCode。

(繼承來源 IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates)

A Principal 代表用來判定檔案系統中物件存取權限的身份。

(繼承來源 IJavaPeerable)
SetPeerReference(JniObjectReference)

將回傳的值設為 PeerReference。

(繼承來源 IJavaPeerable)
ToString()

回傳此原理的字串表示。

(繼承來源 IPrincipal)
UnregisterFromRuntime()

取消註冊此實例,讓執行時不會在未來 Java.Interop.JniRuntime+JniValueManager.PeekValue 的呼叫中回傳該實例。

(繼承來源 IJavaPeerable)

擴充方法

名稱 Description
GetJniTypeName(IJavaPeerable)

取得實例 self類型的 JNI 名稱。

JavaAs<TResult>(IJavaPeerable)

試著強制self輸入 TResult,檢查 強制在 Java 端是否有效。

JavaCast<TResult>(IJavaObject)

執行 Android 執行時檢查型別轉換。

JavaCast<TResult>(IJavaObject)

A Principal 代表用來判定檔案系統中物件存取權限的身份。

TryJavaCast<TResult>(IJavaPeerable, TResult)

試著強制self輸入 TResult,檢查 強制在 Java 端是否有效。

適用於