DeviceConfigurationHolder

public class DeviceConfigurationHolder
extends Object implements IDeviceConfiguration

java.lang.Object
   ↳ com.android.tradefed.config.DeviceConfigurationHolder


A concrete IDeviceConfiguration implementation that stores the loaded device configuration objects in its attributes.

Summary

Public constructors

DeviceConfigurationHolder()
DeviceConfigurationHolder(String deviceName)
DeviceConfigurationHolder(String deviceName, boolean isFake)

Public methods

void addFrequency(Object config, Integer frequency)

Keep track of the frequency of the object so we can properly inject option against it.

void addSpecificConfig(Object config)

Pass one of the allowed objects that the Configuration Holder can keep track of.

IDeviceConfiguration clone()

List<Object> getAllObjectOfType(String configType)

Return The list of all the configuration objects held the instance of IDeviceConfiguration that match the configuration type requested.

List<Object> getAllObjects()

Return The list of all the configuration objects held the instance of IDeviceConfiguration

IBuildProvider getBuildProvider()

Return IBuildProvider that the device configuration holder has reference to.

String getDeviceName()

Returns The Name of the device specified in the field "name" of the configuration.

TestDeviceOptions getDeviceOptions()

Return TestDeviceOptions that the device configuration holder has.

IDeviceRecovery getDeviceRecovery()

Return IDeviceRecovery that the device configuration holder has.

IDeviceSelection getDeviceRequirements()

Return IDeviceSelection that the device configuration holder has.

Integer getFrequency(Object config)

Returns the frequency of the object.

List<ITargetPreparer> getTargetPreparers()

Return a list of ITargetPreparer that the device configuration holder has.

boolean isFake()

Returns whether the container is for a Device Under Test or not.

Public constructors

DeviceConfigurationHolder

public DeviceConfigurationHolder ()

DeviceConfigurationHolder

public DeviceConfigurationHolder (String deviceName)

Parameters
deviceName String

DeviceConfigurationHolder

public DeviceConfigurationHolder (String deviceName, 
                boolean isFake)

Parameters
deviceName String

isFake boolean

Public methods

addFrequency

public void addFrequency (Object config, 
                Integer frequency)

Keep track of the frequency of the object so we can properly inject option against it.

Parameters
config Object: the object we are tracking the frequency.

frequency Integer: frequency associated with the object.

addSpecificConfig

public void addSpecificConfig (Object config)

Pass one of the allowed objects that the Configuration Holder can keep track of.

Complete list of allowed objects are: IBuildProvider, ITargetPreparer, IDeviceRecovery, IDeviceSelection, TestDeviceOptions

Parameters
config Object: object from a type above.

Throws
ConfigurationException

clone

public IDeviceConfiguration clone ()

Returns
IDeviceConfiguration

getAllObjectOfType

public List<Object> getAllObjectOfType (String configType)

Return The list of all the configuration objects held the instance of IDeviceConfiguration that match the configuration type requested.

Parameters
configType String

Returns
List<Object>

getAllObjects

public List<Object> getAllObjects ()

Return The list of all the configuration objects held the instance of IDeviceConfiguration

Returns
List<Object>

getBuildProvider

public IBuildProvider getBuildProvider ()

Return IBuildProvider that the device configuration holder has reference to.

Returns
IBuildProvider

getDeviceName

public String getDeviceName ()

Returns The Name of the device specified in the field "name" of the configuration.

Returns
String

getDeviceOptions

public TestDeviceOptions getDeviceOptions ()

Return TestDeviceOptions that the device configuration holder has.

Returns
TestDeviceOptions

getDeviceRecovery

public IDeviceRecovery getDeviceRecovery ()

Return IDeviceRecovery that the device configuration holder has.

Returns
IDeviceRecovery

getDeviceRequirements

public IDeviceSelection getDeviceRequirements ()

Return IDeviceSelection that the device configuration holder has.

Returns
IDeviceSelection

getFrequency

public Integer getFrequency (Object config)

Returns the frequency of the object.

Parameters
config Object

Returns
Integer

getTargetPreparers

public List<ITargetPreparer> getTargetPreparers ()

Return a list of ITargetPreparer that the device configuration holder has.

Returns
List<ITargetPreparer>

isFake

public boolean isFake ()

Returns whether the container is for a Device Under Test or not.

Returns
boolean