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.
898 899 900 901 902 |
# File 'lib/javaclass/attribute.rb', line 898 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.
911 912 913 |
# File 'lib/javaclass/attribute.rb', line 911 def line_number @line_number end |
#start_pc ⇒ Object
Returns the value of attribute start_pc.
910 911 912 |
# File 'lib/javaclass/attribute.rb', line 910 def start_pc @start_pc end |
Instance Method Details
#to_bytes ⇒ Object
906 907 908 909 |
# File 'lib/javaclass/attribute.rb', line 906 def to_bytes bytes = to_byte( @start_pc, 2 ) bytes += to_byte( @line_number, 2 ) end |
#to_s ⇒ Object
903 904 905 |
# File 'lib/javaclass/attribute.rb', line 903 def to_s "line : #{@line_number}" end |