kango_v
class Test ( val id: UUID ) { private constructor(builder: Builder) : this(builder.id) companion object { inline fun build(id: UUID, block: Builder.() -> Unit) = Builder(id). apply(block).build() } class Builder( val id: UUID) { var text: String? = null fun build() = Test(this) } }
apply
Unresolved reference: apply
Andreas Sinz
pom.xml
build.gradle
compileOnly
karelpeeters
inline
A modern programming language that makes developers happier.