ट्रेडेड कॉन्फ़िगरेशन ऑब्जेक्ट

ट्रेड किया गया एक्सएमएल कॉन्फ़िगरेशन को पार्स किया जाता है और इससे एक Configuration ऑब्जेक्ट बनाया जाता है, जो कॉन्फ़िगरेशन पूरा करें.

ऑब्जेक्ट Iकॉन्फ़िगरेशन इंटरफ़ेस. इसमें एक्सएमएल में तय किए गए सभी ऑब्जेक्ट का एक इंस्टेंस शामिल होगा.

यह उदाहरण:

<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>

इससे यह मिलेगा:

  • BootstrapBuildProvider लौटाने के लिए IConfiguration#getBuildProvider() इंस्टेंस.
  • ITargetPreparer की सूची देने के लिए IConfiguration#getTargetPreparers() PreloadedClassesPreparer का इंस्टेंस शामिल है.
  • IRemoteTest की सूची देने के लिए IConfiguration#getTests() HostTest का इंस्टेंस.

कॉन्फ़िगरेशन ऑब्जेक्ट में मौजूद हर ऑब्जेक्ट को एक्सएमएल पर मैप किया जा सकता है आम तौर पर, एक्सएमएल की परिभाषा को समझने से कॉन्फ़िगरेशन ऑब्जेक्ट से क्या उम्मीद की जानी चाहिए.