Properties

Link copied to clipboard
Link copied to clipboard

Mutable map of the current originating elements this builder contains.

Link copied to clipboard
open override val kdoc: CodeBlock.Builder
Link copied to clipboard
Link copied to clipboard

Mutable map of the current originating elements this builder contains.

Link copied to clipboard
Link copied to clipboard
open override val tags: MutableMap<KClass<*>, Any>

Mutable map of the current tags this builder contains.

Link copied to clipboard

Functions

Link copied to clipboard
open override fun addAnnotation(annotationSpec: AnnotationSpec): FunSpec.Builder
open override fun addAnnotation(annotation: ClassName): FunSpec.Builder
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
open override fun addAnnotation(annotation: Class<*>): FunSpec.Builder
open override fun addAnnotation(annotation: KClass<*>): FunSpec.Builder
Link copied to clipboard
open override fun addAnnotations(annotationSpecs: Iterable<AnnotationSpec>): FunSpec.Builder
Link copied to clipboard
fun addCode(format: String, vararg args: Any?): FunSpec.Builder
Link copied to clipboard
fun addComment(format: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
open override fun addKdoc(block: CodeBlock): FunSpec.Builder
open override fun addKdoc(format: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
Link copied to clipboard
fun addNamedCode(format: String, args: Map<String, *>): FunSpec.Builder
Link copied to clipboard
open fun addOriginatingElement(originatingElement: Element): FunSpec.Builder

Adds an originatingElement to this type's list of originating elements.

Link copied to clipboard
fun addParameter(name: String, type: TypeName, vararg modifiers: KModifier): FunSpec.Builder
fun addParameter(name: String, type: Type, vararg modifiers: KModifier): FunSpec.Builder
fun addParameter(name: String, type: Type, modifiers: Iterable<KModifier>): FunSpec.Builder
fun addParameter(name: String, type: KClass<*>, vararg modifiers: KModifier): FunSpec.Builder
fun addParameter(name: String, type: KClass<*>, modifiers: Iterable<KModifier>): FunSpec.Builder
Link copied to clipboard
Link copied to clipboard
fun addStatement(format: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun beginControlFlow(controlFlow: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
fun build(): FunSpec
Link copied to clipboard
Link copied to clipboard
open fun contextReceivers(vararg receiverTypes: TypeName): FunSpec.Builder

Adds the given receiverTypes to this type's list of originating elements.

open override fun contextReceivers(receiverTypes: Iterable<TypeName>): FunSpec.Builder

Adds the given receiverTypes to this type's list of originating elements.

Link copied to clipboard
Link copied to clipboard
fun jvmModifiers(modifiers: Iterable<Modifier>)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun nextControlFlow(controlFlow: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
fun receiver(receiverType: TypeName, kdoc: CodeBlock = CodeBlock.EMPTY): FunSpec.Builder
fun receiver(receiverType: Type, kdoc: CodeBlock = CodeBlock.EMPTY): FunSpec.Builder
fun receiver(receiverType: KClass<*>, kdoc: CodeBlock = CodeBlock.EMPTY): FunSpec.Builder
fun receiver(receiverType: Type, kdoc: String, vararg args: Any): FunSpec.Builder
fun receiver(receiverType: KClass<*>, kdoc: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
fun returns(returnType: TypeName, kdoc: CodeBlock = CodeBlock.EMPTY): FunSpec.Builder
fun returns(returnType: Type, kdoc: CodeBlock = CodeBlock.EMPTY): FunSpec.Builder
fun returns(returnType: KClass<*>, kdoc: CodeBlock = CodeBlock.EMPTY): FunSpec.Builder
fun returns(returnType: Type, kdoc: String, vararg args: Any): FunSpec.Builder
fun returns(returnType: KClass<*>, kdoc: String, vararg args: Any): FunSpec.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun tag(type: Class<*>, tag: Any?): FunSpec.Builder
open fun tag(type: KClass<*>, tag: Any?): FunSpec.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.

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

Link copied to clipboard
fun FunSpec.Builder.throws(vararg exceptionClasses: TypeName): FunSpec.Builder
fun FunSpec.Builder.throws(vararg exceptionClasses: Type): FunSpec.Builder
fun FunSpec.Builder.throws(vararg exceptionClasses: KClass<out Throwable>): FunSpec.Builder