Builder
Properties
Functions
Link copied to clipboard
fun addAliasedImport(class: <Error class: unknown class><out <Error class: unknown class>>, as: String): FileSpec.Builder
Link copied to clipboard
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead." )
Add an annotation to the file.
Link copied to clipboard
Link copied to clipboard
Adds a comment to the body of this script file in the order that it was added.
Link copied to clipboard
Link copied to clipboard
Adds a default import for the given packageName.
Link copied to clipboard
Adds a file-site comment. This is prefixed to the start of the file and different from addBodyComment.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun addImport(class: <Error class: unknown class><out <Error class: unknown class>>, vararg names: String): FileSpec.Builder
fun addImport(class: <Error class: unknown class><out <Error class: unknown class>>, names: Iterable<String>): FileSpec.Builder
Link copied to clipboard
fun addKotlinDefaultImports(includeJvm: Boolean = true, includeJs: Boolean = true): FileSpec.Builder
Adds Kotlin's standard default package imports as described here.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead." )
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead." )
open fun addProperty(name: String, type: TypeName, modifiers: Iterable<KModifier>): FileSpec.Builder
open fun addProperty(name: String, type: KClass<*>, modifiers: Iterable<KModifier>): FileSpec.Builder
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open fun tag(type: <Error class: unknown class><out <Error class: unknown class>>, tag: Any?): FileSpec.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
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.