Class: JavaClass::Excpetion
- Inherits:
-
Object
- Object
- JavaClass::Excpetion
- Includes:
- Base
- Defined in:
- lib/javaclass/attribute.rb
Overview
例外
Instance Attribute Summary collapse
-
#catch_type_index ⇒ Object
Returns the value of attribute catch_type_index.
-
#end_pc ⇒ Object
Returns the value of attribute end_pc.
-
#handler_pc ⇒ Object
Returns the value of attribute handler_pc.
-
#start_pc ⇒ Object
Returns the value of attribute start_pc.
Instance Method Summary collapse
- #catch_type ⇒ Object
-
#initialize(java_class, start_pc = nil, end_pc = nil, handler_pc = nil, catch_type_index = nil) ⇒ Excpetion
constructor
A new instance of Excpetion.
- #to_bytes ⇒ Object
Methods included from Base
#==, #===, #dump, #eql?, #hash, #to_byte
Constructor Details
#initialize(java_class, start_pc = nil, end_pc = nil, handler_pc = nil, catch_type_index = nil) ⇒ Excpetion
Returns a new instance of Excpetion.
838 839 840 841 842 843 844 |
# File 'lib/javaclass/attribute.rb', line 838 def initialize( java_class, start_pc=nil, end_pc=nil, handler_pc=nil, catch_type_index=nil ) @java_class=java_class @start_pc=start_pc @end_pc=end_pc @handler_pc=handler_pc @catch_type_index=catch_type_index end |
Instance Attribute Details
#catch_type_index ⇒ Object
Returns the value of attribute catch_type_index.
858 859 860 |
# File 'lib/javaclass/attribute.rb', line 858 def catch_type_index @catch_type_index end |
#end_pc ⇒ Object
Returns the value of attribute end_pc.
856 857 858 |
# File 'lib/javaclass/attribute.rb', line 856 def end_pc @end_pc end |
#handler_pc ⇒ Object
Returns the value of attribute handler_pc.
857 858 859 |
# File 'lib/javaclass/attribute.rb', line 857 def handler_pc @handler_pc end |
#start_pc ⇒ Object
Returns the value of attribute start_pc.
855 856 857 |
# File 'lib/javaclass/attribute.rb', line 855 def start_pc @start_pc end |
Instance Method Details
#catch_type ⇒ Object
845 846 847 |
# File 'lib/javaclass/attribute.rb', line 845 def catch_type @catch_type_index == nil ? nil : @java_class.get_constant(@catch_type_index) end |
#to_bytes ⇒ Object
848 849 850 851 852 853 854 |
# File 'lib/javaclass/attribute.rb', line 848 def to_bytes bytes = [] bytes += to_byte( @start_pc, 2 ) bytes += to_byte( @end_pc, 2 ) bytes += to_byte( @handler_pc, 2 ) bytes += to_byte( @catch_type_index, 2 ) end |