鴻蒙OS CommonEventInfo

2022-04-25 14:06 更新

CommonEventInfo

java.lang.Object

|---ohos.bundle.CommonEventInfo

public class CommonEventInfo
extends Object
implements Sequenceable

提供獲取靜態(tài)公共事件配置信息的方法,包括包名、類名和權(quán)限。

嵌套類摘要

從接口 ohos.utils.Sequenceable 繼承的嵌套類/接口
Sequenceable.ProducerT

字段摘要

修飾符和類型 字段 描述
static Sequenceable.ProducerCommonEventInfo PRODUCER 從 Parcel 創(chuàng)建一個(gè) CommonEventInfo 實(shí)例。

構(gòu)造函數(shù)摘要

構(gòu)造函數(shù) 描述
CommonEventInfo() 用于創(chuàng)建 CommonEventInfo 實(shí)例的默認(rèn)構(gòu)造函數(shù),用于存儲(chǔ)有關(guān)靜態(tài)公共事件的配置信息。
CommonEventInfo(CommonEventInfo source) 用于通過從現(xiàn)有參數(shù)復(fù)制參數(shù)來創(chuàng)建 CommonEventInfo 實(shí)例的構(gòu)造函數(shù)。

方法總結(jié)

修飾符和類型 方法 描述
String getBundleName() 獲取此靜態(tài)公共事件的捆綁包名稱。
String getClassName() 獲取此靜態(tài)公共事件的類名。
ListString getData() 獲取此靜態(tài)公共事件中包含的附加數(shù)據(jù)列表。
ListString getEvents() 獲取此靜態(tài)公共事件中包含的事件列表。
String getPermission() 獲取實(shí)現(xiàn)該靜態(tài)公共事件所需的權(quán)限。
ListString getType() 獲取此靜態(tài)公共事件中定義的類型列表。
int getUid() 獲取此靜態(tài)公共事件的 UID。
boolean marshalling(Parcel out) 將此 Sequenceable 對(duì)象編組為 Parcel。
boolean unmarshalling(Parcel in) 從 Parcel 中解組此 Sequenceable 對(duì)象。
從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
從接口 ohos.utils.Sequenceable 繼承的方法
hasFileDescriptor

字段詳細(xì)信息

PRODUCER

public static final Sequenceable.ProducerCommonEventInfo PRODUCER

從 Parcel 創(chuàng)建一個(gè) CommonEventInfo 實(shí)例。

構(gòu)造函數(shù)詳細(xì)信息

CommonEventInfo

public CommonEventInfo()

用于創(chuàng)建 CommonEventInfo 實(shí)例的默認(rèn)構(gòu)造函數(shù),用于存儲(chǔ)有關(guān)靜態(tài)公共事件的配置信息。

CommonEventInfo

public CommonEventInfo(CommonEventInfo source)

用于通過從現(xiàn)有參數(shù)復(fù)制參數(shù)來創(chuàng)建 CommonEventInfo 實(shí)例的構(gòu)造函數(shù)。

參數(shù):

參數(shù)名稱 參數(shù)描述
source 指示現(xiàn)有的 CommonEventInfo 實(shí)例。

方法詳情

getBundleName

public String getBundleName()

獲取此靜態(tài)公共事件的捆綁包名稱。

返回:

返回此靜態(tài)公共事件的包名稱。

getUid

public int getUid()

獲取此靜態(tài)公共事件的 UID。 UID 是分配給應(yīng)用程序的用戶 ID。

返回:

返回此靜態(tài)公共事件的 UID。

getClassName

public String getClassName()

獲取此靜態(tài)公共事件的類名。

返回:

返回此靜態(tài)公共事件的類名。

getPermission

public String getPermission()

獲取實(shí)現(xiàn)該靜態(tài)公共事件所需的權(quán)限。

返回:

返回實(shí)現(xiàn)此靜態(tài)公共事件所需的權(quán)限。

getData

public ListString getData()

獲取此靜態(tài)公共事件中包含的附加數(shù)據(jù)列表。

返回:

返回此靜態(tài)公共事件中包含的附加數(shù)據(jù)列表。

getType

public ListString getType()

獲取此靜態(tài)公共事件中定義的類型列表。

返回:

返回此靜態(tài)公共事件中定義的類型列表。

getEvents

public ListString getEvents()

獲取此靜態(tài)公共事件中包含的事件列表。

返回:

返回此靜態(tài)公共事件中包含的事件列表。

marshalling

public boolean marshalling(Parcel out)

從接口復(fù)制的描述:Sequenceable

將此 Sequenceable 對(duì)象編組為 Parcel。

指定者:

接口 Sequenceable 中的編組

參數(shù):

參數(shù)名稱 參數(shù)描述
out 指示將 Sequenceable 對(duì)象編組到的 Parcel 對(duì)象。

返回:

如果編組成功,則返回 true; 否則返回 false。

unmarshalling

public boolean unmarshalling(Parcel in)

從接口復(fù)制的描述:Sequenceable

從 Parcel 中解組此 Sequenceable 對(duì)象。

指定者:

在接口 Sequenceable 中解組

參數(shù):

參數(shù)名稱 參數(shù)描述
in 指示已將 Sequenceable 對(duì)象編組到的 Parcel 對(duì)象。

返回:

如果解組成功,則返回 true; 否則返回 false。

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)