掃二維碼與項(xiàng)目經(jīng)理溝通
我們?cè)谖⑿派?4小時(shí)期待你的聲音
解答本文疑問/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流

java.lang.Object
|---ohos.bundle.ShortcutIntent
public class ShortcutIntent
extends Object
implements Sequenceable提供用于獲取有關(guān)快捷方式將啟動(dòng)的ability信息的方法,包括目標(biāo)捆綁包名稱和ability類名稱。
| 從接口 ohos.utils.Sequenceable 繼承的嵌套類/接口 |
|---|
| Sequenceable.ProducerT |
| 修飾符和類型 | 字段 | 描述 |
|---|---|---|
| static Sequenceable.ProducerShortcutIntent | PRODUCER | 從 Parcel 創(chuàng)建一個(gè) ShortcutIntent 實(shí)例。 |
| 構(gòu)造函數(shù) | 描述 |
|---|---|
| ShortcutIntent() | 用于創(chuàng)建 ShortcutIntent 實(shí)例的默認(rèn)構(gòu)造函數(shù)。 |
| ShortcutIntent(String targetBundle, String targetClass) | 用于通過目標(biāo)包和類創(chuàng)建 ShortcutIntent 實(shí)例的構(gòu)造函數(shù)。 |
| ShortcutIntent(ShortcutIntent source) | 用于通過從現(xiàn)有參數(shù)復(fù)制參數(shù)來創(chuàng)建 ShortcutIntent 實(shí)例的構(gòu)造函數(shù)。 |
| 修飾符和類型 | Method | Description |
|---|---|---|
| void | addParam(String key, String value) | 添加鍵值對(duì)格式的參數(shù)。 |
| MapString,String | getParams() | 獲取鍵值參數(shù)。 |
| String | getTargetBundle() | 獲取此快捷方式的目標(biāo)ability所屬的捆綁包的名稱。 |
| String | getTargetClass() | 獲取目標(biāo)ability的類名。 |
| boolean | marshalling(Parcel out) | 將此 Sequenceable 對(duì)象編組為 Parcel。 |
| void | setTargetBundle(String targetBundle) | 設(shè)置此快捷方式的目標(biāo)ability所屬的捆綁包的名稱。 |
| void | setTargetClass(String targetClass) | 設(shè)置目標(biāo)ability的類名。 |
| 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 |
public static final Sequenceable.ProducerShortcutIntent PRODUCER
從 Parcel 創(chuàng)建一個(gè) ShortcutIntent 實(shí)例。
public ShortcutIntent()
用于創(chuàng)建 ShortcutIntent 實(shí)例的默認(rèn)構(gòu)造函數(shù)。
public ShortcutIntent(ShortcutIntent source)
用于通過從現(xiàn)有參數(shù)復(fù)制參數(shù)來創(chuàng)建 ShortcutIntent 實(shí)例的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| source | 指示 ShortcutIntent 對(duì)象。 |
public ShortcutIntent(String targetBundle, String targetClass)
用于通過目標(biāo)包和類創(chuàng)建 ShortcutIntent 實(shí)例的構(gòu)造函數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| targetBundle | 指示捆綁包名稱。 |
| targetClass | 表示類名。 |
public void setTargetBundle(String targetBundle)
設(shè)置此快捷方式的目標(biāo)ability所屬的捆綁包的名稱。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| targetBundle | 指示捆綁包名稱。 |
public String getTargetBundle()
獲取此快捷方式的目標(biāo)ability所屬的捆綁包的名稱。
返回:
返回捆綁包名稱。
public void setTargetClass(String targetClass)
設(shè)置目標(biāo)ability的類名。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| targetClass | 表示類名。 |
public String getTargetClass()
獲取目標(biāo)ability的類名。
返回:
返回目標(biāo)ability的類名。
public MapString,String getParams()
獲取鍵值參數(shù)。
返回:
返回參數(shù)。
public void addParam(String key, String value)
添加鍵值對(duì)格式的參數(shù)。
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| key | Indicates the key matching the parameter. |
| value | Indicates the value of the parameter. |
public boolean marshalling(Parcel out)
從接口復(fù)制的描述:Sequenceable
將此 Sequenceable 對(duì)象編組為 Parcel。
指定者:
接口 Sequenceable 中的編組
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| out | 指示將 Sequenceable 對(duì)象編組到的 Parcel 對(duì)象。 |
返回:
如果編組成功,則返回 true; 否則返回 false。
public boolean unmarshalling(Parcel in)
從接口復(fù)制的描述:Sequenceable
從 Parcel 中解組此 Sequenceable 對(duì)象。
指定者:
在接口 Sequenceable 中解組
參數(shù):
| 參數(shù)名稱 | 參數(shù)描述 |
|---|---|
| in | 指示已將 Sequenceable 對(duì)象編組到的 Parcel 對(duì)象。 |
返回:
如果解組成功,則返回 true; 否則返回 false。

我們?cè)谖⑿派?4小時(shí)期待你的聲音
解答本文疑問/技術(shù)咨詢/運(yùn)營(yíng)咨詢/技術(shù)建議/互聯(lián)網(wǎng)交流