Class | JavaClass::ClassFile::Constants::SingleReference |
In: |
lib/javaclass/classfile/constants/single_reference.rb
|
Parent: | Base |
Superclass of single reference constants like ConstantClass (Class) in the constant pool.
Author: | Peter Kofler |
first_index | [R] |
Define a single reference into pool from data beginning at start
# File lib/javaclass/classfile/constants/single_reference.rb, line 15 def initialize(pool, data, start, name=nil) super(name) @tag = data.u1(start) @enclosing_pool = pool @first_index = data.u2(start+1) end
Return part of debug output.
# File lib/javaclass/classfile/constants/single_reference.rb, line 32 def dump super + "##{@first_index};\t// #{to_s}" end
Return the value, which is the referenced value from the pool.
# File lib/javaclass/classfile/constants/single_reference.rb, line 24 def first_value get(@first_index) end