diff --git a/convention/src/main/kotlin/io/gitlab/jfronny/scripts/codegen/ClassGenerator.kt b/convention/src/main/kotlin/io/gitlab/jfronny/scripts/codegen/ClassGenerator.kt index d325839..7a7a50f 100644 --- a/convention/src/main/kotlin/io/gitlab/jfronny/scripts/codegen/ClassGenerator.kt +++ b/convention/src/main/kotlin/io/gitlab/jfronny/scripts/codegen/ClassGenerator.kt @@ -8,12 +8,12 @@ class ClassGenerator(`package`: String, val name: String, val indent: String = " private val implements: MutableList = ArrayList() private var hadImport = false - fun ensureHeader(action: () -> T): T = ensureMutable { + private fun ensureHeader(action: () -> T): T = ensureMutable { if (headerGenerated) throw IllegalAccessException("Attempted to generate pre-header statement while in body") action() } - fun ensureBody(action: () -> T): T = ensureMutable { + private fun ensureBody(action: () -> T): T = ensureMutable { if (!headerGenerated) { headerGenerated = true if (hadImport) gen.appendLine()