配置工廠.ConfigLoader

protected class ConfigurationFactory.ConfigLoader
extends Object

java.lang.Object
com.android.tradefed.config.ConfigurationFactory.ConfigLoader


IConfigDefLoader的實現,它從一個根配置跟踪包含的配置,並在循環包含時拋出異常。

概括

公共構造函數

ConfigLoader (boolean isGlobalConfig)

公共方法

ConfigurationDef getConfigurationDef (String name, templateMap) getConfigurationDef (String name, templateMap)

boolean isGlobalConfig ()

void loadIncludedConfiguration ( ConfigurationDef def, String parentName, String name, String deviceTagObject, templateMap, templateSeen) loadIncludedConfiguration ( ConfigurationDef def, String parentName, String name, String deviceTagObject, templateMap, templateSeen) loadIncludedConfiguration ( ConfigurationDef def, String parentName, String name, String deviceTagObject, templateMap, templateSeen)

捆綁在 tradefed.jar 中的配置只能包括同樣捆綁在 tradefed.jar 中的其他配置。

受保護的方法

String findConfigName (String name, String parentName)

根據其名稱及其父名稱查找配置的名稱。

boolean isBundledConfig (String name)

如果它是在類路徑中找到的配置文件,則返回 true。

boolean isTrackableConfig (String name)

是否應該跟踪配置的生命週期。

void trackConfig (String name, ConfigurationDef def)

跟踪動態加載的配置。

公共構造函數

配置加載器

public ConfigLoader (boolean isGlobalConfig)

參數
isGlobalConfig boolean

公共方法

獲取配置定義

public ConfigurationDef getConfigurationDef (String name, 
                 templateMap)

參數
name String

templateMap

退貨
ConfigurationDef

投擲
ConfigurationException

isGlobalConfig

public boolean isGlobalConfig ()

退貨
boolean

loadIncludedConfiguration

public void loadIncludedConfiguration (ConfigurationDef def, 
                String parentName, 
                String name, 
                String deviceTagObject, 
                 templateMap, 
                 templateSeen)

捆綁在 tradefed.jar 中的配置只能包括同樣捆綁在 tradefed.jar 中的其他配置。但是,本地(外部)配置可以包括本地(外部)配置和捆綁配置。

參數
def ConfigurationDef

parentName String

name String

deviceTagObject String

templateMap

templateSeen

投擲
ConfigurationException

受保護的方法

查找配置名稱

protected String findConfigName (String name, 
                String parentName)

根據其名稱及其父名稱查找配置的名稱。這用於正確處理捆綁配置和本地配置。

參數
name String : 配置的名稱

parentName String : 配置的父名稱。

退貨
String配置的全名。

投擲
com.android.tradefed.config.ConfigurationException
ConfigurationException

isBundledConfig

protected boolean isBundledConfig (String name)

如果它是在類路徑中找到的配置文件,則返回 true。

參數
name String

退貨
boolean

isTrackableConfig

protected boolean isTrackableConfig (String name)

是否應該跟踪配置的生命週期。

參數
name String : 配置的名稱

退貨
boolean如果配置可跟踪, true ,否則false

跟踪配置

protected void trackConfig (String name, 
                ConfigurationDef def)

跟踪動態加載的配置。目前僅支持本地文件。

參數
name String : 配置的名稱

def ConfigurationDef : 配置的定義。