Builder

class Builder : Taggable.Builder<TypeAliasSpec.Builder>

Functions

Link copied to clipboard
fun addAnnotation(annotationSpec: AnnotationSpec): TypeAliasSpec.Builder
fun addAnnotation(annotation: ClassName): TypeAliasSpec.Builder
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
fun addAnnotation(annotation: Class<*>): TypeAliasSpec.Builder
fun addAnnotation(annotation: KClass<*>): TypeAliasSpec.Builder
Link copied to clipboard
fun addAnnotations(annotationSpecs: Iterable<AnnotationSpec>): TypeAliasSpec.Builder
Link copied to clipboard
fun addKdoc(block: CodeBlock): TypeAliasSpec.Builder
fun addKdoc(format: String, vararg args: Any): TypeAliasSpec.Builder
Link copied to clipboard
fun addModifiers(vararg modifiers: KModifier): TypeAliasSpec.Builder
fun addModifiers(modifiers: Iterable<KModifier>): TypeAliasSpec.Builder
Link copied to clipboard
fun addTypeVariable(typeVariable: TypeVariableName): TypeAliasSpec.Builder
Link copied to clipboard
fun addTypeVariables(typeVariables: Iterable<TypeVariableName>): TypeAliasSpec.Builder
Link copied to clipboard
fun build(): TypeAliasSpec
Link copied to clipboard
open fun tag(type: Class<*>, tag: Any?): TypeAliasSpec.Builder
open fun tag(type: KClass<*>, tag: Any?): TypeAliasSpec.Builder

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.

Properties

Link copied to clipboard
val annotations: MutableList<AnnotationSpec>
Link copied to clipboard
val modifiers: MutableSet<KModifier>
Link copied to clipboard
open override val tags: MutableMap<KClass<*>, Any>

Mutable map of the current tags this builder contains.

Link copied to clipboard
val typeVariables: MutableSet<TypeVariableName>

Extensions

Link copied to clipboard
inline fun <T : Any> TypeAliasSpec.Builder.tag(tag: T?): TypeAliasSpec.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.