LiteralAccessor

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

A LiteralAccessor aggregates means of accessing a literal Object in various contexts.

Author

Todd L Smith

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.

Constructors

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

Construct a new LiteralAccessor.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val classLoaderIndex: Int

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

Link copied to clipboard
val fieldName: String?

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

Link copied to clipboard
val getter: (MethodVisitor) -> Unit

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

Link copied to clipboard
val setter: (MethodVisitor) -> Unit?

The Consumer 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.