kotlinpoet / com.squareup.kotlinpoet / FunSpec / Builder

Builder

class Builder

Functions

addAnnotation fun addAnnotation(annotationSpec: AnnotationSpec): Builder
fun addAnnotation(annotation: ClassName): Builder
fun addAnnotation(annotation: Class<*>): Builder
fun addAnnotation(annotation: KClass<*>): Builder
addAnnotations fun addAnnotations(annotationSpecs: Iterable<AnnotationSpec>): Builder
addCode fun addCode(format: String, vararg args: Any): Builder
fun addCode(codeBlock: CodeBlock): Builder
addComment fun addComment(format: String, vararg args: Any): Builder
addException fun addException(exception: TypeName): Builder
fun addException(exception: Type): Builder
fun addException(exception: KClass<*>): Builder
addExceptions fun addExceptions(exceptions: Iterable<TypeName>): Builder
addKdoc fun addKdoc(format: String, vararg args: Any): Builder
fun addKdoc(block: CodeBlock): Builder
addModifiers fun addModifiers(vararg modifiers: KModifier): Builder
fun addModifiers(modifiers: Iterable<KModifier>): Builder
addNamedCode fun addNamedCode(format: String, args: Map<String, *>): Builder
addParameter fun addParameter(parameterSpec: ParameterSpec): Builder
fun addParameter(type: TypeName, name: String, vararg modifiers: KModifier): Builder
fun addParameter(type: Type, name: String, vararg modifiers: KModifier): Builder
fun addParameter(type: KClass<*>, name: String, vararg modifiers: KModifier): Builder
addParameters fun addParameters(parameterSpecs: Iterable<ParameterSpec>): Builder
addStatement fun addStatement(format: String, vararg args: Any): Builder
addTypeVariable fun addTypeVariable(typeVariable: TypeVariableName): Builder
addTypeVariables fun addTypeVariables(typeVariables: Iterable<TypeVariableName>): Builder
beginControlFlow fun beginControlFlow(controlFlow: String, vararg args: Any): Builder
build fun build(): FunSpec
defaultValue fun defaultValue(format: String, vararg args: Any): Builder
fun defaultValue(codeBlock: CodeBlock): Builder
endControlFlow fun endControlFlow(): Builder
jvmModifiers fun jvmModifiers(modifiers: Iterable<Modifier>): Unit
nextControlFlow fun nextControlFlow(controlFlow: String, vararg args: Any): Builder
returns fun returns(returnType: TypeName): Builder
fun returns(returnType: Type): Builder
fun returns(returnType: KClass<*>): Builder
varargs fun varargs(varargs: Boolean = true): Builder