語言

ComponentName 類別

定義

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

[Android.Runtime.Register("android/content/ComponentName", DoNotGenerateAcw=true)]
public sealed class ComponentName : Java.Lang.Object, Android.OS.IParcelable, IDisposable, Java.Lang.ICloneable, Java.Lang.IComparable
[<Android.Runtime.Register("android/content/ComponentName", DoNotGenerateAcw=true)>]
type ComponentName = class
    inherit Object
    interface IParcelable
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
    interface ICloneable
    interface IComparable
繼承
ComponentName
屬性
實作

備註

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。 識別元件需要兩項資訊(此封裝):該元件所包含的套件(字串)以及該套件內的類別(字串)名稱。

Java 文件 android.content.ComponentName

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

建構函式

名稱 Description
ComponentName(Context, Class)

從 Context 和 Class 物件建立一個新的元件識別碼。

ComponentName(Context, String)

從上下文和類別名稱建立新的元件識別碼。

ComponentName(Parcel)

從先前用 #writeToParcel(Parcel, int)寫入的 Parcel 資料實例化一個新的 ComponentName。

ComponentName(String, String)

建立新的元件識別碼。

屬性

名稱 Description
Class

回傳此 Object的執行時類別。

(繼承來源 Object)
ClassName

回傳這個元件的類別名稱。

Creator
Handle

底層 Android 實例的帳號。

(繼承來源 Object)
JniIdentityHashCode

取得由互通執行時指派給此 Java 對等端的身份雜湊碼。

(繼承來源 Object)
JniManagedPeerState

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
JniPeerMembers

取得用於調用此 Java 節點成員的 JNI 元資料。

PackageName

回傳這個元件的套件名稱。

PeerReference

取得這個 Java 節點的 JNI 物件參考。

(繼承來源 Object)
ShortClassName

請回傳類別名稱,可以是完全限定或縮短形式(前置 ')。

ThresholdClass

此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。

(繼承來源 Object)
ThresholdType

此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。

(繼承來源 Object)

方法

名稱 Description
Clone()

建立並回傳一份此副本 Object

CompareTo(ComponentName)
Construct(JniObjectReference, JniObjectReferenceOptions)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
CreateRelative(Context, String)

建立一個新的元件識別碼,類別名稱可指定為絕對或相對於包含的套件。

CreateRelative(String, String)

建立一個新的元件識別碼,類別名稱可指定為絕對或相對於包含的套件。

DescribeContents()

描述此 Parcelable 的組建表示中包含的特殊物件種類。

Dispose()

釋放該 Java 節點所持有的資源。

(繼承來源 Object)
Dispose(Boolean)

釋放該 Java 節點所持有的資源。

(繼承來源 Object)
DisposeUnlessReferenced()

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
Equals(Object)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
Equals(Object)

表示是否有其他物體「等同」於此物。

(繼承來源 Object)
FlattenToShortString()

#flattenToString()相同,但若類別名稱是套件的後綴,則會縮寫。

FlattenToString()

回傳一個字串,明確描述 ComponentName 中包含的套件名稱與類別名稱。

GetHashCode()

回傳物件的雜湊碼值。

(繼承來源 Object)
JavaFinalize()
已淘汰.

當垃圾回收判定該物件不再有相關參考時,由垃圾回收器呼叫。

(繼承來源 Object)
Notify()

喚醒一個正在該物件監視器上等待的執行緒。

(繼承來源 Object)
NotifyAll()

喚醒所有等待該物件監視器的執行緒。

(繼承來源 Object)
ReadFromParcel(Parcel)

讀取先前以 寫入 #writeToParcel(ComponentName, Parcel)的 Parcel 中的 ComponentName,並回傳空或新物件。

SetHandle(IntPtr, JniHandleOwnership)

設定 Handle 屬性。

(繼承來源 Object)
SetPeerReference(JniObjectReference, JniObjectReferenceOptions)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
ToArray<T>()

從這個 Java 陣列包裝器建立一個受管理陣列。

(繼承來源 Object)
ToShortString()

回傳此類別的字串表示,但不包含類別名稱作為前綴。

ToString()

回傳物件的字串表示。

(繼承來源 Object)
UnflattenFromString(String)

從先前用 #flattenToString()建立的字串中恢復 ComponentName。

UnregisterFromRuntime()

將此 Java 節點從互通執行時中取消註冊。

(繼承來源 Object)
Wait()

導致目前執行緒等待被喚醒,通常是透過 <em>通知</><em 或 em>中斷</em> 來喚醒。

(繼承來源 Object)
Wait(Int64, Int32)

會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。

(繼承來源 Object)
Wait(Int64)

會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。

(繼承來源 Object)
WriteToParcel(ComponentName, Parcel)

寫一個 ComponentName 到 Parcel,處理 null 指標。

WriteToParcel(Parcel, ParcelableWriteFlags)

寫一個 ComponentName 到 Parcel,處理 null 指標。

明確介面實作

名稱 Description
IComparable.CompareTo(Object)

將此元件名稱與另一個物件進行比較。

IJavaPeerable.Disposed()

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
IJavaPeerable.Finalized()

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
IJavaPeerable.JniObjectReferenceControlBlock

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
IJavaPeerable.SetJniIdentityHashCode(Int32)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
IJavaPeerable.SetPeerReference(JniObjectReference)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

(繼承來源 JavaObject)
IJavaPeerable.UnregisterFromRuntime()

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

擴充方法

名稱 Description
GetJniTypeName(IJavaPeerable)

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

JavaAs<TResult>(IJavaPeerable)

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

JavaCast<TResult>(IJavaObject)

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

JavaCast<TResult>(IJavaObject)

特定應用程式元件的識別碼(android.app.Activityandroid.app.Serviceandroid.content.BroadcastReceiverandroid.content.ContentProvider)可用。

TryJavaCast<TResult>(IJavaPeerable, TResult)

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

適用於