All Types

com.squareup.kotlinpoet.AnnotationSpec

A generated annotation on a declaration.

com.squareup.kotlinpoet.ArrayTypeName
com.squareup.kotlinpoet.ClassName

A fully-qualified class name for top-level and member classes.

com.squareup.kotlinpoet.CodeBlock

A fragment of a .kt file, potentially containing declarations, statements, and documentation. Code blocks are not necessarily well-formed Kotlin code, and are not validated. This class assumes kotlinc will check correctness later!

com.squareup.kotlinpoet.FunSpec

A generated function declaration.

com.squareup.kotlinpoet.KModifier
com.squareup.kotlinpoet.KotlinFile

A Kotlin file containing top level objects like classes, objects, functions, properties, and type aliases.

com.squareup.kotlinpoet.NameAllocator

Assigns Kotlin identifier names to avoid collisions, keywords, and invalid characters. To use, first create an instance and allocate all of the names that you need. Typically this is a mix of user-supplied names and constants:

com.squareup.kotlinpoet.ParameterSpec

A generated parameter declaration.

com.squareup.kotlinpoet.ParameterizedTypeName
com.squareup.kotlinpoet.PropertySpec

A generated property declaration.

com.squareup.kotlinpoet.TypeName

Any type in Kotlin's type system. This class identifies simple types like Int and String, nullable types like Int?, composite types like Array<String> and Set<String>, and unassignable types like Unit.

com.squareup.kotlinpoet.TypeSpec

A generated class, interface, or enum declaration.

com.squareup.kotlinpoet.TypeVariableName
com.squareup.kotlinpoet.WildcardTypeName