class AnnotationSpec
A generated annotation on a declaration. |
|
class ClassName : TypeName, Comparable<ClassName>
A fully-qualified class name for top-level and member classes. |
|
class 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! |
|
object Dynamic : TypeName |
|
class FileSpec
A Kotlin file containing top level objects like classes, objects, functions, properties, and type aliases. |
|
class FunSpec
A generated function declaration. |
|
enum class KModifier |
|
class LambdaTypeName : TypeName |
|
class 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: |
|
class ParameterSpec
A generated parameter declaration. |
|
class ParameterizedTypeName : TypeName |
|
class PropertySpec
A generated property declaration. |
|
class TypeAliasSpec
A generated typealias declaration |
|
sealed class TypeName
Any type in Kotlin's type system. This class identifies simple types like |
|
class TypeSpec
A generated class, interface, or enum declaration. |
|
class TypeVariableName : TypeName |
|
class WildcardTypeName : TypeName |
val ANY: ClassName |
|
val ARRAY: ClassName |
|
val BOOLEAN: ClassName |
|
val BYTE: ClassName |
|
val CHAR: ClassName |
|
val DOUBLE: ClassName |
|
val DYNAMIC: Dynamic
Dynamic is a singleton |
|
val FLOAT: ClassName |
|
val INT: ClassName |
|
val LONG: ClassName |
|
val SHORT: ClassName |
|
val STAR: WildcardTypeName
The wildcard type |
|
val UNIT: ClassName |
fun buildCodeBlock(builderAction: Builder.() -> Unit): CodeBlock
Builds new CodeBlock by populating newly created CodeBlock.Builder using provided builderAction and then converting it to CodeBlock. |