CodeAttribute

open class CodeAttribute(val pool: ConstantPool, val nameConstant: Int, val maxStack: Int, val maxLocals: Int, val code: ByteArray, val exceptionTable: Array<CodeAttribute.ExceptionTableEntry>, val attributes: Array<Attribute>) : Attribute(source)

Attribute implementation for the code attribute This attribute contains the code of a method

Specification

Since

0.1.0

Parameters

pool

the ConstantPool of the attribute

nameConstant

the name of the attribute

maxStack

the maximum size of the stack

maxLocals

the maximum size of the locals

code

the code of the method

exceptionTable

the exception table of the method

attributes

the attributes of the method

See also

Inheritors

Constructors

Link copied to clipboard
constructor(pool: ConstantPool, nameConstant: Int, maxStack: Int, maxLocals: Int, code: ByteArray, exceptionTable: Array<CodeAttribute.ExceptionTableEntry>, attributes: Array<Attribute>)

Types

Link copied to clipboard
object Companion
Link copied to clipboard
class ExceptionTableEntry(val startPc: Int, val endPc: Int, val handlerPc: Int, val catchType: Int)

An entry of the exception table This is used to handle exceptions

Properties

Link copied to clipboard

The attributes of the method

Link copied to clipboard
open val code: ByteArray

The code of the method

Link copied to clipboard

The exception table of the method

Link copied to clipboard
open val maxLocals: Int

The maximum size of the locals

Link copied to clipboard
open val maxStack: Int

The maximum size of the stack

Link copied to clipboard
open val name: String

The name of the attribute

Link copied to clipboard
open override val nameConstant: Int

The name of the attribute

Link copied to clipboard
open override val pool: ConstantPool

The ConstantPool of the attribute

Link copied to clipboard
open override val value: ByteArray

The value of the attribute (Automatically generated from the maxStack, maxLocals, code, exceptionTable and attributes)

Functions

Link copied to clipboard
open fun compareHelper(other: Any?): Boolean

Compare this Attribute to another Attribute

Link copied to clipboard
open fun dump(): ByteArray

Dump the attribute to a ByteArray

open fun dump(stream: DataOutputStream)

Dump the attribute to a DataOutputStream

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

Check if this CodeAttribute is equal to other

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

Get the hashCode of this CodeAttribute

Link copied to clipboard
open fun hashCodeHelper(): Int

Get the hash code of this Attribute