配置工廠.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 :配置的定義。