Builder

class Builder : Taggable.Builder<TypeSpec.Builder>

Functions

addAssociatedType
Link copied to clipboard
fun addAssociatedType(typeVariable: TypeVariableName): TypeSpec.Builder
addAttribute
Link copied to clipboard
fun addAttribute(attribute: AttributeSpec): TypeSpec.Builder
fun addAttribute(name: String, vararg arguments: String): TypeSpec.Builder
addDoc
Link copied to clipboard
fun addDoc(block: CodeBlock): TypeSpec.Builder
fun addDoc(format: String, vararg args: Any): TypeSpec.Builder
addEnumCase
Link copied to clipboard
fun addEnumCase(enumerationCaseSpec: EnumerationCaseSpec): TypeSpec.Builder
fun addEnumCase(name: String): TypeSpec.Builder
fun addEnumCase(name: String, constant: CodeBlock): TypeSpec.Builder
fun addEnumCase(name: String, type: TupleTypeName): TypeSpec.Builder
fun addEnumCase(name: String, type: TypeName): TypeSpec.Builder
fun addEnumCase(name: String, constant: Int): TypeSpec.Builder
fun addEnumCase(name: String, constant: String): TypeSpec.Builder
addFunction
Link copied to clipboard
fun addFunction(functionSpec: FunctionSpec): TypeSpec.Builder
addFunctions
Link copied to clipboard
fun addFunctions(functionSpecs: Iterable<FunctionSpec>): TypeSpec.Builder
addModifiers
Link copied to clipboard
fun addModifiers(vararg modifiers: Modifier): TypeSpec.Builder
addMutableProperty
Link copied to clipboard
fun addMutableProperty(name: String, type: TypeName, vararg modifiers: Modifier): TypeSpec.Builder
addProperties
Link copied to clipboard
fun addProperties(propertySpecs: Iterable<PropertySpec>): TypeSpec.Builder
addProperty
Link copied to clipboard
fun addProperty(propertySpec: PropertySpec): TypeSpec.Builder
fun addProperty(name: String, type: TypeName, vararg modifiers: Modifier): TypeSpec.Builder
addSuperType
Link copied to clipboard
fun addSuperType(superType: TypeName): TypeSpec.Builder
addSuperTypes
Link copied to clipboard
fun addSuperTypes(superTypes: Iterable<TypeName>): TypeSpec.Builder
addType
Link copied to clipboard
fun addType(typeSpec: AnyTypeSpec): TypeSpec.Builder
addTypes
Link copied to clipboard
fun addTypes(typeSpecs: Iterable<AnyTypeSpec>): TypeSpec.Builder
addTypeVariable
Link copied to clipboard
fun addTypeVariable(typeVariable: TypeVariableName): TypeSpec.Builder
addTypeVariables
Link copied to clipboard
fun addTypeVariables(typeVariables: Iterable<TypeVariableName>): TypeSpec.Builder
build
Link copied to clipboard
fun build(): TypeSpec
constrainToClass
Link copied to clipboard
fun constrainToClass(): TypeSpec.Builder
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
open fun hashCode(): Int
tag
Link copied to clipboard
fun <T : Any> tag(type: Class<T>, tag: T?): TypeSpec.Builder
Attaches tag to the request using type as a key.
fun <T : Any> tag(type: KClass<T>, tag: T?): TypeSpec.Builder
Attaches tag to the request using type as a key.
toString
Link copied to clipboard
open fun toString(): String

Properties

tags
Link copied to clipboard
val tags: MutableMap<KClass<*>, Any>
Mutable map of the current tags this builder contains.

Extensions

tag
Link copied to clipboard
inline fun <T : Any> TypeSpec.Builder.tag(tag: T?): TypeSpec.Builder
Attaches tag to the request using T as a key.