目录

ComponentInfo

Function Info

function ComponentInfo

Component information class, including the app package name and screen information for displaying the activity screen.

Public Constructor Summary

Constructor Name

function ComponentInfo(String packageName, String className, String appType)

Builds a ComponentInfo object.

Public Method Summary

Qualifier and Type

Method Name and Description

String

getPackageName()

Obtains the app package name.

String

getClassName()

Obtains the information about the screen displayed during an activity.

String

getAppType()

Obtains the app type.

-

setPackageName(String packageName)

Sets the app package name.

-

setClassName(String className)

Sets the information about the screen displayed during an activity.

-

setAppType(String appType)

Sets the app type.

Public Constructors

[h2]ComponentInfo(String packageName, String className, String appType)

Constructor

function ComponentInfo(String packageName, String className, String appType)

Builds a ComponentInfo object.

Parameters

Name

Description

packageName

App package name.

className

Information about the screen displayed during an activity.

appType

App type. Set this parameter to Harmony if you are developing a HarmonyOS app.

Public Methods

[h2]getPackageName()

Method

ComponentInfo.prototype.getPackageName = function () {}

Obtains the app package name.

Returns

Type

Description

String

App package name.

[h2]getClassName()

Method

ComponentInfo.prototype.getClassName = function () {}

Obtains the information about the screen displayed during an activity.

Returns

Type

Description

String

Information about the screen displayed during an activity.

[h2]getAppType()

Method

ComponentInfo.prototype.getAppType = function () {}

Obtains the app type.

Returns

Type

Description

String

App type.

[h2]setPackageName(String packageName)

Method

ComponentInfo.prototype.setPackageName = function (String packageName) {

Sets the app package name.

Parameters

Name

Description

packageName

App package name.

[h2]setClassName(String className)

Method

ComponentInfo.prototype.setClassName = function (String className) {

Sets the information about the screen displayed during an activity.

Parameters

Name

Description

className

Information about the screen displayed during an activity.

[h2]setAppType(String appType)

Method

ComponentInfo.prototype.setAppType = function (String appType) {

Sets the app type.

Parameters

Name

Description

appType

App type.