Builder

class Builder : Taggable.Builder<FunctionSpec.Builder>

Functions

abstract
Link copied to clipboard
fun abstract(value: Boolean): FunctionSpec.Builder
addAttribute
Link copied to clipboard
fun addAttribute(attribute: AttributeSpec): FunctionSpec.Builder
fun addAttribute(name: String, vararg arguments: String): FunctionSpec.Builder
addCode
Link copied to clipboard
fun addCode(codeBlock: CodeBlock): FunctionSpec.Builder
fun addCode(format: String, vararg args: Any): FunctionSpec.Builder
addComment
Link copied to clipboard
fun addComment(format: String, vararg args: Any): FunctionSpec.Builder
addDoc
Link copied to clipboard
fun addDoc(block: CodeBlock): FunctionSpec.Builder
fun addDoc(format: String, vararg args: Any): FunctionSpec.Builder
addLocalType
Link copied to clipboard
fun addLocalType(typeSpec: AnyTypeSpec): FunctionSpec.Builder
addLocalTypes
Link copied to clipboard
fun addLocalTypes(typeSpecs: Iterable<AnyTypeSpec>): FunctionSpec.Builder
addModifiers
Link copied to clipboard
fun addModifiers(vararg modifiers: Modifier): FunctionSpec.Builder
fun addModifiers(modifiers: Iterable<Modifier>): FunctionSpec.Builder
addNamedCode
Link copied to clipboard
fun addNamedCode(format: String, args: Map<String, *>): FunctionSpec.Builder
addParameter
Link copied to clipboard
fun addParameter(parameterSpec: ParameterSpec): FunctionSpec.Builder
fun addParameter(name: String, type: TypeName, vararg modifiers: Modifier): FunctionSpec.Builder
fun addParameter(label: String, name: String, type: TypeName, vararg modifiers: Modifier): FunctionSpec.Builder
addParameters
Link copied to clipboard
fun addParameters(parameterSpecs: Iterable<ParameterSpec>): FunctionSpec.Builder
addStatement
Link copied to clipboard
fun addStatement(format: String, vararg args: Any): FunctionSpec.Builder
addTypeVariable
Link copied to clipboard
fun addTypeVariable(typeVariable: TypeVariableName): FunctionSpec.Builder
addTypeVariables
Link copied to clipboard
fun addTypeVariables(typeVariables: Iterable<TypeVariableName>): FunctionSpec.Builder
beginControlFlow
Link copied to clipboard
fun beginControlFlow(controlFlowName: String, controlFlowCode: String, vararg args: Any): FunctionSpec.Builder
build
Link copied to clipboard
fun build(): FunctionSpec
endControlFlow
Link copied to clipboard
fun endControlFlow(controlFlowName: String): FunctionSpec.Builder
equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
failable
Link copied to clipboard
fun failable(value: Boolean): FunctionSpec.Builder
hashCode
Link copied to clipboard
open fun hashCode(): Int
nextControlFlow
Link copied to clipboard
fun nextControlFlow(controlFlowName: String, controlFlowCode: String, vararg args: Any?): FunctionSpec.Builder
returns
Link copied to clipboard
fun returns(returnType: TypeName): FunctionSpec.Builder
tag
Link copied to clipboard
fun <T : Any> tag(type: Class<T>, tag: T?): FunctionSpec.Builder
Attaches tag to the request using type as a key.
fun <T : Any> tag(type: KClass<T>, tag: T?): FunctionSpec.Builder
Attaches tag to the request using type as a key.
throws
Link copied to clipboard
fun throws(value: Boolean): FunctionSpec.Builder
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> FunctionSpec.Builder.tag(tag: T?): FunctionSpec.Builder
Attaches tag to the request using T as a key.