class JvmBytecode::Constants::Constant
Attributes
tag[R]
Public Class Methods
define(t)
click to toggle source
# File lib/jvm_bytecode/constants/constant.rb, line 7 def define(t) @@constants ||= {} @@constants[t] = self @tag = t end
fetch(t)
click to toggle source
# File lib/jvm_bytecode/constants/constant.rb, line 14 def fetch(t) @@constants[t] || raise(Errors::ConstantError, "Constant:#{t} is not implemented") end
Public Instance Methods
additional_bytecode()
click to toggle source
# File lib/jvm_bytecode/constants/constant.rb, line 23 def additional_bytecode '' end
bytecode()
click to toggle source
# File lib/jvm_bytecode/constants/constant.rb, line 19 def bytecode [self.class.tag].pack('C') + additional_bytecode end