poet.FormatSpecifier.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlin-code-generation Show documentation
Show all versions of kotlin-code-generation Show documentation
Wrapping core components for kotlin code generation with kotlin-poet.
The newest version!
package io.toolisticon.kotlin.generation.poet
import com.squareup.kotlinpoet.CodeBlock
import com.squareup.kotlinpoet.ExperimentalKotlinPoetApi
import com.squareup.kotlinpoet.MemberName
import io.toolisticon.kotlin.generation.KotlinCodeGeneration.format
@ExperimentalKotlinPoetApi
object FormatSpecifier {
const val STRING = format.FORMAT_STRING
const val STRING_TEMPLATE = format.FORMAT_STRING_TEMPLATE
const val TYPE = format.FORMAT_TYPE
const val MEMBER = format.FORMAT_MEMBER
const val NAME = format.FORMAT_NAME
const val LITERAL = format.FORMAT_LITERAL
fun MemberName.asCodeBlock() = CodeBlock.of(MEMBER, this)
fun String.asCodeBlock() = CodeBlock.of(STRING, this)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy