UsingNumberData

An immutable numeric literal from a method's instructions, without source-type inference.

rawBits contains the decoded bit pattern, not the instruction's encoded bytes. For 32-bit values its upper 32 bits are zero; 64-bit values retain every bit, including the sign bit. Arithmetic lit8/lit16 operands are sign-extended to 32 bits.

Integer and floating views interpret the same bits differently. This class is not Number: its accessors do not perform arbitrary numeric conversions. No matching tolerance is applied. Exact NaN payloads are preserved by rawBits; floating operations or promotion may quiet a signaling NaN on some platforms.

Equality compares opCode and rawBits exactly, independently of the containing method or occurrence. A returned instance remains usable after the bridge closes.

Properties

Link copied to clipboard

Decoded value width: 32 or 64. This is not the encoded immediate's bit count.

Link copied to clipboard
val opCode: Int

Source DEX opcode (0..255). Only const* and integer lit8/lit16 instructions occur.

Link copied to clipboard

Functions

Link copied to clipboard

Double bit view of a 64-bit const, or the decoded float view promoted to double. Arithmetic lit8/lit16 operands throw IllegalStateException.

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

Float bit view of a 32-bit const. Other opcodes throw IllegalStateException.

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

Signed 32-bit view. Throws IllegalStateException for a 64-bit literal.

Link copied to clipboard

Signed integer view; a 32-bit value is sign-extended without loss.

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