交易 XML 設定
並透過該物件建立 Configuration
物件,用來描述
才能完成設定
物件則由 IConfiguration 介面。 它會包含 XML 中定義的所有物件的例項。
這個範例:
<configuration description="<description of the configuration>">
<!-- A build provider that takes local device information -->
<build_provider class="com.android.tradefed.build.BootstrapBuildProvider" />
<!-- Some target preparation, disabled by default -->
<target_preparer class="com.android.tradefed.targetprep.PreloadedClassesPreparer">
<option name="disable" value="true" />
</target_preparer>
<!-- One test running some unit tests -->
<test class="com.android.tradefed.testtype.HostTest">
<option name="class" value="com.android.tradefed.build.BuildInfoTest" />
</test>
</configuration>
會產生:
IConfiguration#getBuildProvider()
可傳回BootstrapBuildProvider
執行個體。IConfiguration#getTargetPreparers()
可傳回ITargetPreparer
的清單 包含PreloadedClassesPreparer
的例項。IConfiguration#getTests()
:傳回IRemoteTest
清單,其中包含HostTest
的例項。
設定物件中的每個單一物件都能對應到 XML 因此瞭解 XML 定義通常有助於瞭解 對設定物件的影響