kotlinpoet / com.squareup.kotlinpoet / ParameterSpec / Builder

Builder

class Builder : Taggable.Builder<ParameterSpec.Builder>

Properties

annotations

val annotations: MutableList<AnnotationSpec>

kdoc

val kdoc: CodeBlock.Builder

modifiers

val modifiers: MutableList<KModifier>

tags

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

Mutable map of the current tags this builder contains.

Functions

addAnnotation

fun addAnnotation(annotationSpec: AnnotationSpec): ParameterSpec.Builder
fun addAnnotation(annotation: ClassName): ParameterSpec.Builder
fun addAnnotation(annotation: Class<*>): ParameterSpec.Builder
fun addAnnotation(annotation: KClass<*>): ParameterSpec.Builder

addAnnotations

fun addAnnotations(annotationSpecs: Iterable<AnnotationSpec>): ParameterSpec.Builder

addKdoc

fun addKdoc(format: String, vararg args: Any): ParameterSpec.Builder
fun addKdoc(block: CodeBlock): ParameterSpec.Builder

addModifiers

fun addModifiers(vararg modifiers: KModifier): ParameterSpec.Builder
fun addModifiers(modifiers: Iterable<KModifier>): ParameterSpec.Builder

build

fun build(): ParameterSpec

defaultValue

fun defaultValue(format: String, vararg args: Any?): ParameterSpec.Builder
fun defaultValue(codeBlock: CodeBlock): ParameterSpec.Builder

jvmModifiers

fun jvmModifiers(modifiers: Iterable<Modifier>): ParameterSpec.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> ParameterSpec.Builder.tag(tag: T?): ParameterSpec.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.