设备配置持有人
public class DeviceConfigurationHolder
extends Object
implements IDeviceConfiguration
java.lang.Object | |
↳ | 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) 传递 Configuration Holder 可以跟踪的允许对象之一。 |
void | addSpecificConfig (Object config) 传递 Configuration Holder 可以跟踪的允许对象之一。 |
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)
传递 Configuration Holder 可以跟踪的允许对象之一。
允许对象的完整列表是: IBuildProvider
、 ITargetPreparer
、 IDeviceRecovery
、 IDeviceSelection
、 TestDeviceOptions
参数 | |
---|---|
config | Object :来自上述类型的对象。 |
type | String :传递的配置对象的类型。 |
投掷 | |
---|---|
ConfigurationException |
添加特定配置
public void addSpecificConfig (Object config)
传递 Configuration Holder 可以跟踪的允许对象之一。
允许对象的完整列表是: IBuildProvider
、 ITargetPreparer
、 IDeviceRecovery
、 IDeviceSelection
、 TestDeviceOptions
参数 | |
---|---|
config | Object :来自上述类型的对象。 |
投掷 | |
---|---|
ConfigurationException |
克隆
public IDeviceConfiguration clone (String newName)
以新名称返回此IDeviceConfiguration
对象的浅表副本。
参数 | |
---|---|
newName | String |
退货 | |
---|---|
IDeviceConfiguration |
获取所有对象类型
publicgetAllObjectOfType (String configType)
返回所有配置对象的列表,其中包含与请求的配置类型匹配的IDeviceConfiguration
实例。
参数 | |
---|---|
configType | String |
退货 | |
---|---|
getBuildProvider
public IBuildProvider getBuildProvider ()
返回设备配置持有者引用的IBuildProvider
。
退货 | |
---|---|
IBuildProvider |
获取设备名称
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 |