com.faendir.kotlin.autodsl.CodeWriter.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of processor Show documentation
Show all versions of processor Show documentation
Auto-generates DSL for your Kotlin projects using annotations.
package com.faendir.kotlin.autodsl
import com.squareup.kotlinpoet.FileSpec
interface CodeWriter {
fun emit(source: S, fileSpec: FileSpec)
}
fun FileSpec.writeTo(source: S, codeWriter: CodeWriter) = codeWriter.emit(source, this)