Encapsulate classOfT property of AsmBuilder

This commit is contained in:
Iaroslav 2020-06-28 19:08:44 +07:00
parent 2a34110f1d
commit 3d85c22497
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -16,13 +16,13 @@ import kotlin.reflect.KClass
* ASM Builder is a structure that abstracts building a class designated to unwrap [MST] to plain Java expression. * ASM Builder is a structure that abstracts building a class designated to unwrap [MST] to plain Java expression.
* This class uses [ClassLoader] for loading the generated class, then it is able to instantiate the new class. * This class uses [ClassLoader] for loading the generated class, then it is able to instantiate the new class.
* *
* @param T the type of AsmExpression to unwrap. * @property T the type of AsmExpression to unwrap.
* @param algebra the algebra the applied AsmExpressions use. * @property algebra the algebra the applied AsmExpressions use.
* @param className the unique class name of new loaded class. * @property className the unique class name of new loaded class.
* @param invokeLabel0Visitor the function to apply to this object when generating invoke method, label 0. * @property invokeLabel0Visitor the function to apply to this object when generating invoke method, label 0.
*/ */
internal class AsmBuilder<T> internal constructor( internal class AsmBuilder<T> internal constructor(
internal val classOfT: KClass<*>, private val classOfT: KClass<*>,
private val algebra: Algebra<T>, private val algebra: Algebra<T>,
private val className: String, private val className: String,
private val invokeLabel0Visitor: AsmBuilder<T>.() -> Unit private val invokeLabel0Visitor: AsmBuilder<T>.() -> Unit