Class: JavaClass::ClassFile::Constants::ConstantAsciz

Inherits:
Value
  • Object
show all
Defined in:
lib/javaclass/classfile/constants/value.rb

Overview

ZenTest SKIP

Instance Attribute Summary

Attributes inherited from Value

#value

Attributes inherited from Base

#name, #size, #slots, #tag

Instance Method Summary collapse

Methods inherited from Value

#to_s

Constructor Details

#initialize(pool, data, start) ⇒ ConstantAsciz

Returns a new instance of ConstantAsciz.



99
100
101
102
103
104
105
106
107
# File 'lib/javaclass/classfile/constants/value.rb', line 99

def initialize(pool, data, start) 
  super('Asciz')
  silence_unused_warning(pool)
  @tag = data.u1(start)
  
  @length = data.u2(start+1)
  @size = 3 + @length
  @value = data[start+3..start+3+@length-1]
end

Instance Method Details

#dumpObject



109
110
111
# File 'lib/javaclass/classfile/constants/value.rb', line 109

def dump
  super + ';'
end