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

Inherits:
Value 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

Methods inherited from Base

#const_class?, #const_field?, #const_method?

Constructor Details

#initialize(pool, data, start) ⇒ ConstantAsciz

Returns a new instance of ConstantAsciz.



109
110
111
112
113
114
115
116
117
# File 'lib/javaclass/classfile/constants/value.rb', line 109

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



119
120
121
# File 'lib/javaclass/classfile/constants/value.rb', line 119

def dump
  super + ';'
end