ClusterCommandConfigBuilder

public class ClusterCommandConfigBuilder
extends Object

java.lang.Object
com.android.tradefed.cluster.ClusterCommandConfigBuilder


用于为集群命令构建配置文件的类。

摘要

公共构造函数

ClusterCommandConfigBuilder()

公共方法

File build()

构建配置文件。

ClusterCommandConfigBuilder setClusterCommand(ClusterCommand command)

设置 ClusterCommand 对象。

ClusterCommandConfigBuilder setTestContext(TestContext testContext)

设置 TestContext 对象。

ClusterCommandConfigBuilder setTestEnvironment(TestEnvironment testEnvironment)

设置 TestEnvironment 对象。

ClusterCommandConfigBuilder setTestResources(List<TestResource> testResources)

设置 TestResource 对象列表。

ClusterCommandConfigBuilder setWorkDir(File workDir)

为命令设置工作目录。

公共构造函数

ClusterCommandConfigBuilder

public ClusterCommandConfigBuilder ()

公共方法

build

public File build ()

构建配置文件。

返回
File 生成的配置文件的 File 对象。

抛出
ConfigurationException
IOException
JSONException

setClusterCommand

public ClusterCommandConfigBuilder setClusterCommand (ClusterCommand command)

设置 ClusterCommand 对象。

参数
command ClusterCommandClusterCommand 对象。

返回
ClusterCommandConfigBuilder 用于链式调用的 ClusterCommandConfigBuilder

setTestContext

public ClusterCommandConfigBuilder setTestContext (TestContext testContext)

设置 TestContext 对象。

参数
testContext TestContextTestContext 对象。

返回
ClusterCommandConfigBuilder 用于链式调用的 ClusterCommandConfigBuilder

setTestEnvironment

public ClusterCommandConfigBuilder setTestEnvironment (TestEnvironment testEnvironment)

设置 TestEnvironment 对象。

参数
testEnvironment TestEnvironmentTestEnvironment 对象。

返回
ClusterCommandConfigBuilder 用于链式调用的 ClusterCommandConfigBuilder

setTestResources

public ClusterCommandConfigBuilder setTestResources (List<TestResource> testResources)

设置 TestResource 对象列表。

参数
testResources ListTestResource 对象列表。

返回
ClusterCommandConfigBuilder 用于链式调用的 ClusterCommandConfigBuilder

setWorkDir

public ClusterCommandConfigBuilder setWorkDir (File workDir)

为命令设置工作目录。

参数
workDir File:工作目录。

返回
ClusterCommandConfigBuilder 用于链式调用的 ClusterCommandConfigBuilder