kotlinpoet / com.squareup.kotlinpoet / AnnotationSpec / Builder

Builder

class Builder : Taggable.Builder<AnnotationSpec.Builder>

Properties

members

val members: MutableList<CodeBlock>

tags

val tags: MutableMap<KClass<*>, Any>

Mutable map of the current tags this builder contains.

Functions

addMember

fun addMember(format: String, vararg args: Any): AnnotationSpec.Builder
fun addMember(codeBlock: CodeBlock): AnnotationSpec.Builder

build

fun build(): AnnotationSpec

useSiteTarget

fun useSiteTarget(useSiteTarget: AnnotationSpec.UseSiteTarget?): AnnotationSpec.Builder

Inherited Functions

tag

open fun tag(type: Class<*>, tag: Any?): T
open fun tag(type: KClass<*>, tag: Any?): T

Attaches tag to the request using type as a key. Tags can be read from a request using Taggable.tag. Use null to remove any existing tag assigned for type.

Extension Functions

tag

fun <T : Any> AnnotationSpec.Builder.tag(tag: T?): AnnotationSpec.Builder

Attaches tag to the request using T as a key. Tags can be read from a request using Taggable.tag. Use null to remove any existing tag assigned for T.