IDeviceConfiguration
public
interface
IDeviceConfiguration
| com.android.tradefed.config.IDeviceConfiguration |
设备配置持有者接口。 用于表示可保存设备配置信息的对象。
摘要
公共方法 | |
|---|---|
abstract
void
|
addFrequency(Object config, Integer frequency)
跟踪对象的频次,以便我们针对该对象正确注入选项。 |
abstract
void
|
addSpecificConfig(Object config, String type)
传递配置持有者可以跟踪的允许对象之一。 |
abstract
void
|
addSpecificConfig(Object config)
传递配置持有者可以跟踪的允许对象之一。 |
abstract
IDeviceConfiguration
|
clone(String newName)
返回此 |
abstract
IDeviceConfiguration
|
clone()
返回此 |
abstract
List<Object>
|
getAllObjectOfType(String configType)
返回 |
abstract
List<Object>
|
getAllObjects()
返回 |
abstract
IBuildProvider
|
getBuildProvider()
返回设备配置持有者引用的 |
abstract
String
|
getDeviceName()
返回配置的“名称”字段中指定的设备名称。 |
abstract
TestDeviceOptions
|
getDeviceOptions()
返回设备配置持有者拥有的 |
abstract
IDeviceRecovery
|
getDeviceRecovery()
返回设备配置持有者拥有的 |
abstract
IDeviceSelection
|
getDeviceRequirements()
返回设备配置持有者拥有的 |
abstract
Integer
|
getFrequency(Object config)
返回对象的频次。 |
abstract
List<ITargetPreparer>
|
getLabPreparers()
返回设备配置持有者拥有的 |
abstract
List<ITargetPreparer>
|
getTargetPreparers()
返回设备配置持有者拥有的 |
abstract
boolean
|
isFake()
返回容器是否用于受测设备。 |
abstract
void
|
removeObjectType(String type)
从设备配置持有者中移除指定对象类型。 |
公共方法
addFrequency
public abstract void addFrequency (Object config,
Integer frequency)跟踪对象的频次,以便我们针对该对象正确注入选项。
| 参数 | |
|---|---|
config |
Object:我们正在跟踪频次的对象。 |
frequency |
Integer:与对象关联的频次。 |
addSpecificConfig
public abstract void addSpecificConfig (Object config,
String type)传递配置持有者可以跟踪的允许对象之一。
允许的对象完整列表如下:IBuildProvider、ITargetPreparer、IDeviceRecovery、IDeviceSelection、TestDeviceOptions
| 参数 | |
|---|---|
config |
Object:来自上述类型的对象。 |
type |
String:所传递的配置对象的类型。 |
| 抛出 | |
|---|---|
ConfigurationException |
如果传递的对象与允许的类型不匹配,则会引发此错误。 |
addSpecificConfig
public abstract void addSpecificConfig (Object config)
传递配置持有者可以跟踪的允许对象之一。
允许的对象完整列表如下:IBuildProvider、ITargetPreparer、IDeviceRecovery、IDeviceSelection、TestDeviceOptions
| 参数 | |
|---|---|
config |
Object:来自上述类型的对象。 |
| 抛出 | |
|---|---|
ConfigurationException |
如果传递的对象与允许的类型不匹配,则会引发此错误。 |
clone
public abstract IDeviceConfiguration clone (String newName)
返回此 IDeviceConfiguration 对象的浅层副本,并使用新名称。
| 参数 | |
|---|---|
newName |
String |
| 返回 | |
|---|---|
IDeviceConfiguration |
|
clone
public abstract IDeviceConfiguration clone ()
返回此 IDeviceConfiguration 对象的浅层副本。
| 返回 | |
|---|---|
IDeviceConfiguration |
|
getAllObjectOfType
public abstract List<Object> getAllObjectOfType (String configType)
返回 IDeviceConfiguration 实例中保存的与所请求的配置类型匹配的所有配置对象的列表。
| 参数 | |
|---|---|
configType |
String |
| 返回 | |
|---|---|
List<Object> |
|
getAllObjects
public abstract List<Object> getAllObjects ()
返回 IDeviceConfiguration 实例中保存的所有配置对象的列表
| 返回 | |
|---|---|
List<Object> |
|
getBuildProvider
public abstract IBuildProvider getBuildProvider ()
返回设备配置持有者引用的 IBuildProvider。
| 返回 | |
|---|---|
IBuildProvider |
|
getDeviceName
public abstract String getDeviceName ()
返回配置的“名称”字段中指定的设备的名称。
| 返回 | |
|---|---|
String |
|
getDeviceOptions
public abstract TestDeviceOptions getDeviceOptions ()
返回设备配置持有者拥有的 TestDeviceOptions。
| 返回 | |
|---|---|
TestDeviceOptions |
|
getDeviceRecovery
public abstract IDeviceRecovery getDeviceRecovery ()
返回设备配置持有者拥有的 IDeviceRecovery。
| 返回 | |
|---|---|
IDeviceRecovery |
|
getDeviceRequirements
public abstract IDeviceSelection getDeviceRequirements ()
返回设备配置持有者拥有的 IDeviceSelection。
| 返回 | |
|---|---|
IDeviceSelection |
|
getFrequency
public abstract Integer getFrequency (Object config)
返回对象的频次。
| 参数 | |
|---|---|
config |
Object |
| 返回 | |
|---|---|
Integer |
|
getLabPreparers
public abstract List<ITargetPreparer> getLabPreparers ()
返回设备配置持有者拥有的 ITargetPreparer 列表。
| 返回 | |
|---|---|
List<ITargetPreparer> |
|
getTargetPreparers
public abstract List<ITargetPreparer> getTargetPreparers ()
返回设备配置持有者拥有的 ITargetPreparer 列表。
| 返回 | |
|---|---|
List<ITargetPreparer> |
|
isFake
public abstract boolean isFake ()
返回容器是否用于受测设备。
| 返回 | |
|---|---|
boolean |
|
removeObjectType
public abstract void removeObjectType (String type)
从设备配置持有者中移除指定对象类型。
| 参数 | |
|---|---|
type |
String:要移除的对象类型。 |
| 抛出 | |
|---|---|
ConfigurationException |
以防类型不受支持。 |