İşleme tabi XML yapılandırması ayrıştırılır ve bundan, eksiksiz yapılandırmayı açıklayan bir Configuration
nesnesi oluşturulur.
Nesne, IConfiguration arayüzü tarafından tanımlanır.XML'de tanımlanan tüm nesnelerin bir örneğini içerir.
Bu örnek:
<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>
Sonuç:
BootstrapBuildProvider
örneği döndürmek içinIConfiguration#getBuildProvider()
.IConfiguration#getTargetPreparers()
ilePreloadedClassesPreparer
örneğini içerenITargetPreparer
listesini döndürür.HostTest
örneğini içerenIRemoteTest
listesini döndürmek içinIConfiguration#getTests()
tuşuna basın.
Yapılandırma nesnesindeki her nesne, XML tanımıyla eşlenebilir. Bu nedenle, XML tanımını anlamak genellikle yapılandırma nesnesinden ne bekleneceğini anlamanıza yardımcı olur.