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, String type)

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

void addSpecificConfig(Object config)

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

IDeviceConfiguration clone(String newName)

Return a shallow copy of this IDeviceConfiguration object, under a new name.

IDeviceConfiguration clone()

getAllObjectOfType(String configType)

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

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.

getLabPreparers()

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

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.

void removeObjectType(String type)

Remove the specified object type from the device configuration holder.

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, 
                String type)

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.

type String: the type of configuration object being passed.

Throws
ConfigurationException

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 (String newName)

Return a shallow copy of this IDeviceConfiguration object, under a new name.

Parameters
newName String

Returns
IDeviceConfiguration

clone

public IDeviceConfiguration clone ()

Returns
IDeviceConfiguration

getAllObjectOfType

public  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

getAllObjects

public  getAllObjects ()

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

Returns

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

getLabPreparers

public  getLabPreparers ()

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

Returns

getTargetPreparers

public  getTargetPreparers ()

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

Returns

isFake

public boolean isFake ()

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

Returns
boolean

removeObjectType

public void removeObjectType (String type)

Remove the specified object type from the device configuration holder.

Parameters
type String: The type of the object to remove.

Throws
ConfigurationException