ConstantPoolEntry

A ConstantPoolEntry is an entry in the constant pool of a class file

Specification

Since

0.1.0

See also

Inheritors

Constructors

Link copied to clipboard
protected constructor()

Types

Link copied to clipboard
class ByteConstant(val value: Byte) : ConstantPoolEntry

A ByteConstant is a constant pool entry that contains a byte

Link copied to clipboard
class ClassConstant(val identifier: Int) : ConstantPoolEntry

A ClassConstant is a constant pool entry that contains a class identifier

Link copied to clipboard
object Companion
Link copied to clipboard

A DoubleConstant is a constant pool entry that contains a double

Link copied to clipboard

A FloatConstant is a constant pool entry that contains a float

Link copied to clipboard
class IntConstant(val value: Int) : ConstantPoolEntry

An IntConstant is a constant pool entry that contains an int

Link copied to clipboard
class LongConstant(val value: Long) : ConstantPoolEntry

A LongConstant is a constant pool entry that contains a long

Link copied to clipboard

A ShortConstant is a constant pool entry that contains a short

Link copied to clipboard
class StringConstant(val identifier: Int) : ConstantPoolEntry

A StringConstant is a constant pool entry that contains a string identifier

Link copied to clipboard

A Utf8Constant is a constant pool entry that contains a string

Functions

Link copied to clipboard

Dump the entry into a byte array

abstract fun dump(stream: DataOutputStream)

Dump the entry to the given stream

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

Every ConstantPoolEntry should implement equals() to check if the entry is equal to the given other object

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

Every ConstantPoolEntry should implement hashCode() to get the hash code of the entry

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

Every ConstantPoolEntry should implement toString() to get a string representation of the entry