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

Methods inherited from Base

#const_class?, #const_field?, #const_method?

Constructor Details

#initialize(pool, data, start) ⇒ ConstantNameAndType

Returns a new instance of ConstantNameAndType.



98
99
100
# File 'lib/javaclass/classfile/constants/double_reference.rb', line 98

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

Instance Method Details

#dumpObject



106
107
108
# File 'lib/javaclass/classfile/constants/double_reference.rb', line 106

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

#to_sObject



102
103
104
# File 'lib/javaclass/classfile/constants/double_reference.rb', line 102

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