Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
annotation class CodeGenDsl
DSL marker for code generation DSL components.
Link copied to clipboard
Marker annotation for internal API components.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Scope for withNameAllocator.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
@DelicateKotlinPoetApi(message = "Mirror APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun <T : Annotation> Annotatable.Builder<*>.addAnnotation(block: AnnotationSpecBuilderScope = {}): AnnotationSpec
inline fun Annotatable.Builder<*>.addAnnotation(type: ClassName, block: AnnotationSpecBuilderScope = {}): AnnotationSpec
inline fun Annotatable.Builder<*>.addAnnotation(type: ParameterizedTypeName, block: AnnotationSpecBuilderScope = {}): AnnotationSpec
@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.")
inline fun Annotatable.Builder<*>.addAnnotation(type: KClass<out Annotation>, block: AnnotationSpecBuilderScope = {}): AnnotationSpec
Link copied to clipboard
inline fun <C> TypeSpecHolder.Builder<*>.addAnnotationClass(block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addAnnotationClass(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addAnnotationClass(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addClass(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addClass(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addCompanionObject(name: String? = null, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addEnum(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addEnum(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
fun TypeSpec.Builder.addEnumConstant(name: String, builder: TypeSpecBuilderScope = {}): TypeSpec.Builder
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addExpectClass(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addExpectClass(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
inline fun MemberSpecHolder.Builder<*>.addFunction(memberName: MemberName, block: FunSpecBuilderScope = {}): FunSpec
inline fun MemberSpecHolder.Builder<*>.addFunction(name: String, block: FunSpecBuilderScope = {}): FunSpec
Link copied to clipboard
inline fun <C> TypeSpecHolder.Builder<*>.addFunInterface(block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addFunInterface(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addFunInterface(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addInterface(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addInterface(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addObject(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpecHolder.Builder<*>.addObject(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
@DelicateKotlinPoetApi(message = "Element APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun <T> FunSpec.Builder.addParameter(vararg modifiers: KModifier, noinline block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
inline fun <T> FunSpec.Builder.addParameter(modifiers: Iterable<KModifier>, noinline block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
fun FunSpec.Builder.addParameter(type: TypeName, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
fun FunSpec.Builder.addParameter(type: TypeName, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
fun FunSpec.Builder.addParameter(type: Type, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
fun FunSpec.Builder.addParameter(type: Type, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
inline fun <T> FunSpec.Builder.addParameter(name: String, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun <T> FunSpec.Builder.addParameter(name: String, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
fun FunSpec.Builder.addParameter(type: KClass<*>, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
fun FunSpec.Builder.addParameter(type: KClass<*>, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): SubSpecDelegateProvider<ParameterSpec>
inline fun FunSpec.Builder.addParameter(name: String, type: TypeName, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun FunSpec.Builder.addParameter(name: String, type: TypeName, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun FunSpec.Builder.addParameter(name: String, type: Type, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun FunSpec.Builder.addParameter(name: String, type: Type, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun FunSpec.Builder.addParameter(name: String, type: KClass<*>, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun FunSpec.Builder.addParameter(name: String, type: KClass<*>, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
Link copied to clipboard
inline fun <T> MemberSpecHolder.Builder<*>.addProperty(vararg modifiers: KModifier, noinline block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
inline fun <T> MemberSpecHolder.Builder<*>.addProperty(modifiers: Iterable<KModifier>, noinline block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
fun MemberSpecHolder.Builder<*>.addProperty(type: TypeName, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
fun MemberSpecHolder.Builder<*>.addProperty(type: TypeName, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
fun MemberSpecHolder.Builder<*>.addProperty(type: Type, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun <T> MemberSpecHolder.Builder<*>.addProperty(name: String, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun <T> MemberSpecHolder.Builder<*>.addProperty(name: String, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): PropertySpec
fun MemberSpecHolder.Builder<*>.addProperty(type: KClass<*>, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
fun MemberSpecHolder.Builder<*>.addProperty(type: KClass<*>, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): SubSpecDelegateProvider<PropertySpec>
inline fun MemberSpecHolder.Builder<*>.addProperty(name: String, type: TypeName, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun MemberSpecHolder.Builder<*>.addProperty(name: String, type: TypeName, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun MemberSpecHolder.Builder<*>.addProperty(name: String, type: Type, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun MemberSpecHolder.Builder<*>.addProperty(name: String, type: KClass<*>, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun MemberSpecHolder.Builder<*>.addProperty(name: String, type: KClass<*>, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): PropertySpec
Link copied to clipboard
inline fun <S> TypeSpec.Builder.addSuperinterface(delegate: CodeBlock = emptyCodeBlock()): TypeSpec.Builder
Link copied to clipboard
inline fun TypeSpecHolder.Builder<*>.addValueClass(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
inline fun TypeSpec.Companion.annotation(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
@DelicateKotlinPoetApi(message = "Mirror APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun AnnotationSpec(type: ParameterizedTypeName, block: AnnotationSpecBuilderScope = {}): AnnotationSpec
@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.")
inline fun AnnotationSpec(type: KClass<out Annotation>, block: AnnotationSpecBuilderScope = {}): AnnotationSpec
Link copied to clipboard
Link copied to clipboard
Converts an Enum constant to a MemberName.
@DelicateKotlinPoetApi(message = "This API uses internal Kotlin reflection APIs and might break at any time")
Converts a reference to a callable (Property or function) to a MemberName.
Link copied to clipboard
inline fun TypeSpec.Companion.class(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun TypeSpec.Companion.companionObject(name: String? = null, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Creates an empty CodeBlock.
Link copied to clipboard
inline fun TypeSpec.Companion.enum(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
inline fun TypeSpec.Companion.expectClass(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
inline fun FileSpec(packageName: String, fileName: String, block: FileSpecBuilderScope = {}): FileSpec
Link copied to clipboard
inline fun TypeSpec.Companion.funInterface(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
inline fun TypeSpec.Companion.funInterface(name: String, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <R, R_> LambdaTypeName.Companion.get(vararg parameters: ParameterSpec = emptyArray()): LambdaTypeName
inline fun <R, R_> LambdaTypeName.Companion.get(vararg parameters: TypeName = emptyArray()): LambdaTypeName
inline fun <R, R_> LambdaTypeName.Companion.get(parameters: List<ParameterSpec> = emptyList()): LambdaTypeName
inline fun <R, R_> LambdaTypeName.Companion.get(parameters: List<ParameterSpec> = emptyList(), contextReceivers: List<TypeName> = emptyList()): LambdaTypeName
Link copied to clipboard
Link copied to clipboard
Indents this file with width spaces.
Link copied to clipboard
inline fun TypeSpec.Companion.interface(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
inline fun <R, R_> LambdaTypeName(parameters: List<ParameterSpec> = emptyList(), contextReceivers: List<TypeName> = emptyList()): LambdaTypeName
fun LambdaTypeName(receiver: TypeName? = null, vararg parameters: ParameterSpec = emptyArray(), returnType: TypeName): LambdaTypeName
fun LambdaTypeName(receiver: TypeName? = null, vararg parameters: TypeName = emptyArray(), returnType: TypeName): LambdaTypeName
fun LambdaTypeName(receiver: TypeName? = null, parameters: List<ParameterSpec> = emptyList(), returnType: TypeName): LambdaTypeName
fun LambdaTypeName(receiver: TypeName? = null, parameters: List<ParameterSpec> = emptyList(), returnType: TypeName, contextReceivers: List<TypeName> = emptyList()): LambdaTypeName
Link copied to clipboard
inline fun TypeSpec.Companion.object(className: ClassName, block: TypeSpecBuilderScope = {}): TypeSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@DelicateKotlinPoetApi(message = "Element APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun <T> ParameterSpec(name: String, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun <T> ParameterSpec(name: String, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun ParameterSpec(name: String, type: TypeName, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun ParameterSpec(name: String, type: TypeName, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun ParameterSpec(name: String, type: Type, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun ParameterSpec(name: String, type: Type, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun ParameterSpec(name: String, type: KClass<*>, vararg modifiers: KModifier, block: ParameterSpecBuilderScope = {}): ParameterSpec
inline fun ParameterSpec(name: String, type: KClass<*>, modifiers: Iterable<KModifier>, block: ParameterSpecBuilderScope = {}): ParameterSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun <T> PropertySpec(name: String, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun <T> PropertySpec(name: String, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun PropertySpec(name: String, type: TypeName, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun PropertySpec(name: String, type: TypeName, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun PropertySpec(name: String, type: Type, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun PropertySpec(name: String, type: KClass<*>, vararg modifiers: KModifier, block: PropertySpecBuilderScope = {}): PropertySpec
inline fun PropertySpec(name: String, type: KClass<*>, modifiers: Iterable<KModifier>, block: PropertySpecBuilderScope = {}): PropertySpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun FileSpec.Companion.script(fileName: String, packageName: String = "", block: FileSpecBuilderScope = {}): FileSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun TypeAliasSpec(name: String, type: TypeName, block: TypeAliasSpecBuilderScope = {}): TypeAliasSpec
@DelicateKotlinPoetApi(message = "Java reflection APIs don't give complete information on Kotlin types. Consider using the kotlinpoet-metadata APIs instead.")
inline fun TypeAliasSpec(name: String, type: KClass<*>, block: TypeAliasSpecBuilderScope = {}): TypeAliasSpec
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun CodeBlock.Builder.withControlFlow(controlFlow: String, vararg args: Any?, block: CodeBlockBuilderScope): CodeBlock.Builder
fun FileSpec.Builder.withControlFlow(controlFlow: String, vararg args: Any, block: FileSpecBuilderScope): FileSpec.Builder
fun FunSpec.Builder.withControlFlow(controlFlow: String, vararg args: Any, block: FunSpecBuilderScope): FunSpec.Builder
Link copied to clipboard
Convenience function to avoid name clashes.