Mark ensure* as private
This commit is contained in:
parent
aa0209d7de
commit
c227e496c3
|
@ -8,12 +8,12 @@ class ClassGenerator(`package`: String, val name: String, val indent: String = "
|
|||
private val implements: MutableList<String> = ArrayList()
|
||||
private var hadImport = false
|
||||
|
||||
fun <T> ensureHeader(action: () -> T): T = ensureMutable {
|
||||
private fun <T> ensureHeader(action: () -> T): T = ensureMutable {
|
||||
if (headerGenerated) throw IllegalAccessException("Attempted to generate pre-header statement while in body")
|
||||
action()
|
||||
}
|
||||
|
||||
fun <T> ensureBody(action: () -> T): T = ensureMutable {
|
||||
private fun <T> ensureBody(action: () -> T): T = ensureMutable {
|
||||
if (!headerGenerated) {
|
||||
headerGenerated = true
|
||||
if (hadImport) gen.appendLine()
|
||||
|
|
Loading…
Reference in New Issue