Class: JavaClass::ClassFile::Constants::ConstantNameAndType

Inherits:
DoubleReference show all
Defined in:
lib/javaclass/classfile/constants/double_reference.rb

Overview

ZenTest SKIP

Instance Attribute Summary

Attributes inherited from DoubleReference

#second_index

Attributes inherited from SingleReference

#first_index

Attributes inherited from Base

#name, #size, #slots, #tag

Instance Method Summary collapse

Methods inherited from DoubleReference

#second_value

Methods inherited from SingleReference

#first_value

Constructor Details

#initialize(pool, data, start) ⇒ ConstantNameAndType

Returns a new instance of ConstantNameAndType.



84
85
86
# File 'lib/javaclass/classfile/constants/double_reference.rb', line 84

def initialize(pool, data, start)
  super(pool, data, start)
end

Instance Method Details

#dumpObject



92
93
94
# File 'lib/javaclass/classfile/constants/double_reference.rb', line 92

def dump
  "#{@name}\t##{name_index}:##{descriptor_index};//  #{to_s}"
end

#to_sObject



88
89
90
# File 'lib/javaclass/classfile/constants/double_reference.rb', line 88

def to_s
  "#{get(name_index)}:#{get(descriptor_index)}"
end