Class: JavaClass::LineNumber
- Inherits:
-
Object
- Object
- JavaClass::LineNumber
- Includes:
- Base
- Defined in:
- lib/javaclass/attribute.rb
Overview
行番号
Instance Attribute Summary collapse
-
#line_number ⇒ Object
Returns the value of attribute line_number.
-
#start_pc ⇒ Object
Returns the value of attribute start_pc.
Instance Method Summary collapse
-
#initialize(java_class, start_pc = nil, line_number = nil) ⇒ LineNumber
constructor
A new instance of LineNumber.
- #to_bytes ⇒ Object
- #to_s ⇒ Object
Methods included from Base
#==, #===, #dump, #eql?, #hash, #to_byte
Constructor Details
#initialize(java_class, start_pc = nil, line_number = nil) ⇒ LineNumber
Returns a new instance of LineNumber.
902 903 904 905 906 |
# File 'lib/javaclass/attribute.rb', line 902 def initialize( java_class, start_pc=nil, line_number=nil ) @java_class=java_class @start_pc=start_pc @line_number=line_number end |
Instance Attribute Details
#line_number ⇒ Object
Returns the value of attribute line_number.
915 916 917 |
# File 'lib/javaclass/attribute.rb', line 915 def line_number @line_number end |
#start_pc ⇒ Object
Returns the value of attribute start_pc.
914 915 916 |
# File 'lib/javaclass/attribute.rb', line 914 def start_pc @start_pc end |
Instance Method Details
#to_bytes ⇒ Object
910 911 912 913 |
# File 'lib/javaclass/attribute.rb', line 910 def to_bytes bytes = to_byte( @start_pc, 2 ) bytes += to_byte( @line_number, 2 ) end |
#to_s ⇒ Object
907 908 909 |
# File 'lib/javaclass/attribute.rb', line 907 def to_s "line : #{@line_number}" end |