LiteralAccessor

fun LiteralAccessor(    classLoaderIndex: Int,     fieldName: String?,     getter: (MethodVisitor) -> Unit,     setter: (MethodVisitor) -> Unit?)

Construct a new LiteralAccessor.

Parameters

classLoaderIndex

The index into the JVMChunkClassLoader's parameters array at which the corresponding literal is located, or invalidIndex if no slot is required.

fieldName

The name of the private static final field of the generated JVMChunk subclass in which the corresponding literal is located, or null if no field is required.

getter

The function that generates an access of the literal when evaluated.

setter

The function that generates storage of the literal when evaluated, or null if no such facility is required. The generated code assumes that the value to install is on top of the stack.