配置工厂.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

是全局配置

public boolean isGlobalConfig ()

退货
boolean

加载包含的配置

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

是捆绑配置

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 :配置的定义。