MutableClass

class MutableClass(pool: MutableConstantPool, var nameConstant: Int, var superNameConstant: Int, var flags: Short, var interfacesConstants: MutableList<Int>, fields: MutableList<MutableField>, methods: MutableList<MutableMethod>, subClasses: MutableList<MutableClass>, attributes: MutableList<MutableAttribute>) : Class(source)

A mutable class that represents a class in the bytecode

See Class Specification

Since

0.1.0

Parameters

pool

The MutableConstantPool of the class

nameConstant

The constant of the name of the class

superNameConstant

The constant of the super name of the class

flags

The flags of the class

interfacesConstants

The constants of the interfaces of the class

subClasses

The subclasses of the class

methods

The methods of the class

fields

The fields of the class

attributes

The attributes of the class

See also

Constructors

Link copied to clipboard
constructor(pool: MutableConstantPool, nameConstant: Int, superNameConstant: Int, flags: Short, interfacesConstants: MutableList<Int>, fields: MutableList<MutableField>, methods: MutableList<MutableMethod>, subClasses: MutableList<MutableClass>, attributes: MutableList<MutableAttribute>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The attributes of the class

Link copied to clipboard
open override val fields: MutableList<MutableField>

The subclasses of the class

Link copied to clipboard
open override var flags: Short

The flags of the class

Link copied to clipboard
open override var interfaces: List<String>

The interfaces of the class

Link copied to clipboard
open override var interfacesConstants: MutableList<Int>

The constants of the interfaces of the class

Link copied to clipboard
open override var isAbstract: Boolean

Is the class abstract? (Checks if the seventh bit of the flags is set / sets the seventh bit of the flags)

Link copied to clipboard
open override var isAnnotation: Boolean

Is the class an annotation? (Checks if the ninth bit of the flags is set / sets the ninth bit of the flags)

Link copied to clipboard
open override var isEnum: Boolean

Is the class an enum? (Checks if the tenth bit of the flags is set / sets the tenth bit of the flags)

Link copied to clipboard
open override var isFinal: Boolean

Is the class final? (Checks if the fifth bit of the flags is set / sets the fifth bit of the flags)

Link copied to clipboard
open override var isInterface: Boolean

Is the class an interface? (Checks if the sixth bit of the flags is set / sets the sixth bit of the flags)

Link copied to clipboard
open override var isObject: Boolean

Is the class an object? (Checks if the eleventh bit of the flags is set / sets the eleventh bit of the flags)

Link copied to clipboard
open override var isPrivate: Boolean

Is the class private? (Checks if the second bit of the flags is set / sets the second bit of the flags)

Link copied to clipboard
open override var isProtected: Boolean

Is the class protected? (Checks if the third bit of the flags is set / sets the third bit of the flags)

Link copied to clipboard
open override var isPublic: Boolean

Is the class public? (Checks if the first bit of the flags is set / sets the first bit of the flags)

Link copied to clipboard
open override var isStatic: Boolean

Is the class static? (Checks if the fourth bit of the flags is set / sets the fourth bit of the flags)

Link copied to clipboard
open override var isSynthetic: Boolean

Is the class synthetic? (Checks if the eighth bit of the flags is set / sets the eighth bit of the flags)

Link copied to clipboard
open override val methods: MutableList<MutableMethod>

The methods of the class

Link copied to clipboard
open override var name: String

The name of the class

Link copied to clipboard
open override var nameConstant: Int

The index of a ConstantPoolEntry.Utf8Constant constant in the ConstantPool that represents the name of the class

Link copied to clipboard
open override val pool: MutableConstantPool

The MutableConstantPool of the class

Link copied to clipboard
open override val subClasses: MutableList<MutableClass>

The subclasses of the class

Link copied to clipboard
open override var superName: String

The super name of the class

Link copied to clipboard
open override var superNameConstant: Int

The index of a ConstantPoolEntry.Utf8Constant constant in the ConstantPool that represents the super name of the class

Functions

Link copied to clipboard

Dumps the class to a ByteArray

fun dump(stream: DataOutputStream)

Dumps the class to the given stream

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

Compares this Class to the other object

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

Returns the hash code of this Class