Builder

class Builder

Fluent builder for App, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

构造函数(Constructors)

Link copied to clipboard
constructor()

函数

Link copied to clipboard
fun appName(appName: String): App.Builder
Link copied to clipboard
fun build(): App
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun plugins(plugins: List<Plugin>): App.Builder
fun plugins(vararg plugins: Plugin): App.Builder
Link copied to clipboard
Link copied to clipboard
fun rootAgent(rootAgent: BaseAgent?): App.Builder

用于设置根代理(root agent); null 该值是从根节点获取的,这与节点构造函数的实现方式一致。

Link copied to clipboard
fun rootNode(rootNode: Node?): App.Builder

用于设置根节点。功能类似于…… copy这样就可以保持已设置的根代理(root agent)状态不变;如果需要将根代理重新设置到另一个节点上,也需要执行相应的操作(即再次调用相应的函数)。 rootAgent(null) 从这个节点中提取根代理(root agent)。