MessagesBuilder

一个用于动态构建 Messages 的构建器。 使用 create 构建。

Kotlin 中也可以使用 buildMessages 以 DSL 的方式构建 Messages

See also

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun add(element: Message.Element): MessagesBuilder

Add an element to the MessagesBuilder container.

Link copied to clipboard
open override fun addAll(messages: Iterable<Message.Element>): MessagesBuilder

Add the given messages to the MessagesBuilder container.

Link copied to clipboard
open override fun build(): Messages

Build Messages.

Inherited functions

Link copied to clipboard
open fun add(text: String): MessagesBuilder

Adds the given text as Text to the MessagesBuilder container.

Link copied to clipboard
operator fun MessagesAddable<*>.plusAssign(text: String)

使用 += operator 添加 text

使用 += operator 添加 messages

operator fun MessagesAddable<*>.plusAssign(element: Message.Element)

使用 += operator 添加 element

Link copied to clipboard
open operator fun String.unaryPlus(): MessagesBuilder

Add a text as Text to this MessagesAddable.

Add messages to this MessagesAddable.

Add an element to this MessagesAddable.