设备配置持有人
public class DeviceConfigurationHolder
extends Object
implements IDeviceConfiguration
对象 | |
↳ | com.android.tradefed.config.DeviceConfigurationHolder |
一个具体IDeviceConfiguration
实现,存储在它的属性加载的设备配置对象。
概括
公共构造函数 | |
---|---|
DeviceConfigurationHolder () | |
DeviceConfigurationHolder (String deviceName) | |
DeviceConfigurationHolder (String deviceName, boolean isFake) |
公共方法 | |
---|---|
void | addFrequency (Object config, Integer frequency) 跟踪对象的频率,以便我们可以正确地为它注入选项。 |
void | addSpecificConfig (Object config, String type) 传递配置持有者可以跟踪的允许对象之一。 |
void | addSpecificConfig (Object config) 传递配置持有者可以跟踪的允许对象之一。 |
IDeviceConfiguration | clone (String newName) 返回此的浅表副本 |
IDeviceConfiguration | clone () |
getAllObjectOfType (String configType) 返回所有配置对象的列表举行的实例 | |
getAllObjects () 返回所有配置对象的列表举行的实例 | |
IBuildProvider | getBuildProvider () 返回 |
String | getDeviceName () 返回 在配置的“名称”字段中指定的设备名称。 |
TestDeviceOptions | getDeviceOptions () 返回 |
IDeviceRecovery | getDeviceRecovery () 返回 |
IDeviceSelection | getDeviceRequirements () 返回 |
Integer | getFrequency (Object config) 返回对象的频率。 |
getLabPreparers () 返回列表 | |
getTargetPreparers () 返回列表 | |
boolean | isFake () 返回容器是否用于被测设备。 |
void | removeObjectType (String type) 从设备配置持有者中删除指定的对象类型。 |
公共构造函数
设备配置持有人
public DeviceConfigurationHolder ()
设备配置持有人
public DeviceConfigurationHolder (String deviceName)
参数 | |
---|---|
deviceName | String |
设备配置持有人
public DeviceConfigurationHolder (String deviceName, boolean isFake)
参数 | |
---|---|
deviceName | String |
isFake | boolean |
公共方法
添加频率
public void addFrequency (Object config, Integer frequency)
跟踪对象的频率,以便我们可以正确地为它注入选项。
参数 | |
---|---|
config | Object :对象,我们跟踪的频率。 |
frequency | Integer :与所述对象相关联的频率。 |
添加特定配置
public void addSpecificConfig (Object config, String type)
传递配置持有者可以跟踪的允许对象之一。
允许的对象的完整列表是: IBuildProvider
, ITargetPreparer
, IDeviceRecovery
, IDeviceSelection
, TestDeviceOptions
参数 | |
---|---|
config | Object :从上方的类型的对象。 |
type | String :被传递的配置的对象的类型。 |
投掷 | |
---|---|
ConfigurationException |
添加特定配置
public void addSpecificConfig (Object config)
传递配置持有者可以跟踪的允许对象之一。
允许的对象的完整列表是: IBuildProvider
, ITargetPreparer
, IDeviceRecovery
, IDeviceSelection
, TestDeviceOptions
参数 | |
---|---|
config | Object :从上方的类型的对象。 |
投掷 | |
---|---|
ConfigurationException |
克隆
public IDeviceConfiguration clone (String newName)
返回此的浅表副本IDeviceConfiguration
对象,以新的名称。
参数 | |
---|---|
newName | String |
退货 | |
---|---|
IDeviceConfiguration |
获取所有对象类型
publicgetAllObjectOfType (String configType)
返回所有配置对象的列表举行的实例IDeviceConfiguration
匹配的配置类型要求。
参数 | |
---|---|
configType | String |
退货 | |
---|---|
获取设备名称
public String getDeviceName ()
返回 在配置的“名称”字段中指定的设备名称。
退货 | |
---|---|
String |
获取设备选项
public TestDeviceOptions getDeviceOptions ()
返回TestDeviceOptions
该设备配置保持器具有。
退货 | |
---|---|
TestDeviceOptions |
获取设备要求
public IDeviceSelection getDeviceRequirements ()
返回IDeviceSelection
该设备配置保持器具有。
退货 | |
---|---|
IDeviceSelection |
获取频率
public Integer getFrequency (Object config)
返回对象的频率。
参数 | |
---|---|
config | Object |
退货 | |
---|---|
Integer |
是假的
public boolean isFake ()
返回容器是否用于被测设备。
退货 | |
---|---|
boolean |
移除对象类型
public void removeObjectType (String type)
从设备配置持有者中删除指定的对象类型。
参数 | |
---|---|
type | String :的对象的类型的清除。 |
投掷 | |
---|---|
ConfigurationException |