Builder
Functions
Link copied to clipboard
fun addAliasedImport(memberName: MemberName, as: String): FileSpec.Builder
Content copied to clipboard
fun addAliasedImport( className: ClassName, memberName: String, as: String): FileSpec.Builder
Content copied to clipboard
Link copied to clipboard
Add an annotation to the file.
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
fun addImport(className: ClassName, vararg names: String): FileSpec.Builder
Content copied to clipboard
fun addImport(className: ClassName, names: Iterable<String>): FileSpec.Builder
Content copied to clipboard
fun addImport(class: Class<*>, names: Iterable<String>): FileSpec.Builder
Content copied to clipboard
fun addImport(packageName: String, vararg names: String): FileSpec.Builder
Content copied to clipboard
fun addImport(packageName: String, names: Iterable<String>): FileSpec.Builder
Content copied to clipboard
fun addImport(class: KClass<*>, names: Iterable<String>): FileSpec.Builder
Content copied to clipboard
Link copied to clipboard
fun addKotlinDefaultImports(includeJvm: Boolean = true, includeJs: Boolean = true): FileSpec.Builder
Content copied to clipboard
Adds Kotlin's standard default package imports as described here.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun beginControlFlow(controlFlow: String, vararg args: Any): FileSpec.Builder
Content 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
fun nextControlFlow(controlFlow: String, vararg args: Any): FileSpec.Builder
Content copied to clipboard
Link copied to clipboard
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.
Properties
Extensions
Link copied to clipboard
Link copied to clipboard
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.