Class JavaClass::ClassFile::Constants::DoubleReference
In: lib/javaclass/classfile/constants/double_reference.rb
Parent: SingleReference

Superclass of double reference constants like ConstantField (FieldRef) in the constant pool.

Author:Peter Kofler

Methods

dump   new   second_value   to_s  

Attributes

second_index  [R] 

Public Class methods

Define a double reference into pool from data beginning at start

[Source]

# File lib/javaclass/classfile/constants/double_reference.rb, line 15
        def initialize(pool, data, start, name=nil)
          super(pool, data, start, name)
          @size = 5

          @second_index = data.u2(start+3)
        end

Public Instance methods

Return part of debug output.

[Source]

# File lib/javaclass/classfile/constants/double_reference.rb, line 33
        def dump
          "#{@name}\t##{@first_index}.##{@second_index};\t//  #{to_s}"
        end

Return the second value, which is the referenced value from the pool.

[Source]

# File lib/javaclass/classfile/constants/double_reference.rb, line 23
        def second_value
          get(@second_index)
        end

Return the value, which are both referenced values from the pool.

[Source]

# File lib/javaclass/classfile/constants/double_reference.rb, line 28
        def to_s
          "#{super}.#{second_value}"
        end

[Validate]