Class: JvmBytecode::Instructions::InvokeSpecial

Inherits:
Instruction
  • Object
show all
Defined in:
lib/jvm_bytecode/instructions/instruction_set.rb

Instance Attribute Summary

Attributes inherited from Instruction

#args, #cp

Instance Method Summary collapse

Methods inherited from Instruction

all, #bytecode, fetch, format, #initialize

Constructor Details

This class inherits a constructor from JvmBytecode::Instructions::Instruction

Instance Method Details

#additional_bytecodeObject



34
35
36
# File 'lib/jvm_bytecode/instructions/instruction_set.rb', line 34

def additional_bytecode
  [args.first].pack('S>')
end

#decode(io) ⇒ Object



38
39
40
41
# File 'lib/jvm_bytecode/instructions/instruction_set.rb', line 38

def decode(io)
  super(io)
  self.args = io.read(2).unpack('S>')
end

#to_hashObject



43
44
45
# File 'lib/jvm_bytecode/instructions/instruction_set.rb', line 43

def to_hash
  super.merge({ ref: args.first })
end