MutableConstantPool

A MutableConstantPool is a ConstantPool with the ability to add and remove ConstantPoolEntrys

Since

0.1.0

Parameters

entries

The entries of the MutableConstantPool

Constructors

Link copied to clipboard
constructor(entries: MutableList<ConstantPoolEntry> = mutableListOf())

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The entries of the MutableConstantPool

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open override fun add(element: ConstantPoolEntry): Boolean
open override fun add(index: Int, element: ConstantPoolEntry)
Link copied to clipboard
open override fun addAll(elements: Collection<ConstantPoolEntry>): Boolean
open override fun addAll(index: Int, elements: Collection<ConstantPoolEntry>): Boolean
Link copied to clipboard
open override fun clear()
Link copied to clipboard
open operator override fun contains(element: ConstantPoolEntry): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<ConstantPoolEntry>): Boolean
Link copied to clipboard
fun createByte(value: Byte): Int

Create a ConstantPoolEntry.ByteConstant with the given value

Link copied to clipboard
fun createClass(value: Int): Int
fun createClass(value: String): Int

Create a ConstantPoolEntry.ClassConstant with the given value

Link copied to clipboard
fun createDouble(value: Double): Int

Create a ConstantPoolEntry.DoubleConstant with the given value

Link copied to clipboard
fun createFloat(value: Float): Int

Create a ConstantPoolEntry.FloatConstant with the given value

Link copied to clipboard
fun createInt(value: Int): Int

Create a ConstantPoolEntry.IntConstant with the given value

Link copied to clipboard
fun createLong(value: Long): Int

Create a ConstantPoolEntry.LongConstant with the given value

Link copied to clipboard
fun createShort(value: Short): Int

Create a ConstantPoolEntry.ShortConstant with the given value

Link copied to clipboard
fun createString(value: Int): Int
fun createString(value: String): Int

Create a ConstantPoolEntry.StringConstant with the given value

Link copied to clipboard
fun createUtf8(value: String): Int

Create a ConstantPoolEntry.Utf8Constant with the given value

Link copied to clipboard

Dump the ConstantPool to a ByteArray

fun dump(stream: DataOutputStream)

Dump the ConstantPool to the given stream

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Check if the ConstantPool is equal to the given other object

Link copied to clipboard
fun findByte(value: Byte): Int?

Find the ConstantPoolEntry.ByteConstant with the given value

Link copied to clipboard
fun findClass(identifier: Int): Int?
fun findClass(name: String): Int?

Find the ConstantPoolEntry.ClassConstant with the given name

Link copied to clipboard
fun findDouble(value: Double): Int?

Find the ConstantPoolEntry.DoubleConstant with the given value

Link copied to clipboard
fun findFloat(value: Float): Int?

Find the ConstantPoolEntry.FloatConstant with the given value

Link copied to clipboard
fun findInt(value: Int): Int?

Find the ConstantPoolEntry.IntConstant with the given value

Link copied to clipboard
fun findLong(value: Long): Int?

Find the ConstantPoolEntry.LongConstant with the given value

Link copied to clipboard
fun findShort(value: Short): Int?

Find the ConstantPoolEntry.ShortConstant with the given value

Link copied to clipboard
fun findString(value: Int): Int?
fun findString(value: String): Int?

Find the ConstantPoolEntry.StringConstant with the given value

Link copied to clipboard
fun findUtf8(value: String): Int?

Find the ConstantPoolEntry.Utf8Constant with the given value

Link copied to clipboard
open operator override fun get(index: Int): ConstantPoolEntry
Link copied to clipboard

Get the constant at the given index as a ConstantPoolEntry.ByteConstant

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get the constant at the given index as a ConstantPoolEntry.IntConstant

Link copied to clipboard

Get the constant at the given index as a ConstantPoolEntry.LongConstant

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Get the constant at the given identifier as a ConstantPoolEntry.Utf8Constant

Link copied to clipboard
open override fun hashCode(): Int

Get the hashCode of the ConstantPool

Link copied to clipboard
open override fun indexOf(element: ConstantPoolEntry): Int
Link copied to clipboard
fun isByte(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.ByteConstant

Link copied to clipboard
fun isClass(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.ClassConstant

Link copied to clipboard
fun isDouble(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.DoubleConstant

Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
fun isFloat(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.FloatConstant

Link copied to clipboard
fun isInt(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.IntConstant

Link copied to clipboard
fun isLong(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.LongConstant

Link copied to clipboard
fun isShort(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.ShortConstant

Link copied to clipboard
fun isString(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.StringConstant

Link copied to clipboard
fun isUtf8(index: Int): Boolean

Check if the constant at the given index is a ConstantPoolEntry.Utf8Constant

Link copied to clipboard
open operator override fun iterator(): MutableIterator<ConstantPoolEntry>
Link copied to clipboard
open override fun lastIndexOf(element: ConstantPoolEntry): Int
Link copied to clipboard
Link copied to clipboard
open override fun remove(element: ConstantPoolEntry): Boolean
Link copied to clipboard
open override fun removeAll(elements: Collection<ConstantPoolEntry>): Boolean
Link copied to clipboard
open override fun removeAt(index: Int): ConstantPoolEntry
Link copied to clipboard
fun resolveByte(value: Byte): Int

Resolve the ConstantPoolEntry.ByteConstant with the given value If a ConstantPoolEntry.ByteConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveClass(value: Int): Int
fun resolveClass(value: String): Int

Resolve the ConstantPoolEntry.ClassConstant with the given value If a ConstantPoolEntry.ClassConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveDouble(value: Double): Int

Resolve the ConstantPoolEntry.DoubleConstant with the given value If a ConstantPoolEntry.DoubleConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveFloat(value: Float): Int

Resolve the ConstantPoolEntry.FloatConstant with the given value If a ConstantPoolEntry.FloatConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveInt(value: Int): Int

Resolve the ConstantPoolEntry.IntConstant with the given value If a ConstantPoolEntry.IntConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveLong(value: Long): Int

Resolve the ConstantPoolEntry.LongConstant with the given value If a ConstantPoolEntry.LongConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveShort(value: Short): Int

Resolve the ConstantPoolEntry.ShortConstant with the given value If a ConstantPoolEntry.ShortConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveString(value: Int): Int
fun resolveString(value: String): Int

Resolve the ConstantPoolEntry.StringConstant with the given value If a ConstantPoolEntry.StringConstant with the given value does not exist, it will be created

Link copied to clipboard
fun resolveUtf8(value: String): Int

Resolve the ConstantPoolEntry.Utf8Constant with the given value If a ConstantPoolEntry.Utf8Constant with the given value does not exist, it will be created

Link copied to clipboard
open override fun retainAll(elements: Collection<ConstantPoolEntry>): Boolean
Link copied to clipboard
open operator override fun set(index: Int, element: ConstantPoolEntry): ConstantPoolEntry
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): MutableList<ConstantPoolEntry>
Link copied to clipboard
open override fun toString(): String

Get the string representation of the ConstantPool