Class: JavaClass::LocalVariableType
- Inherits:
-
Object
- Object
- JavaClass::LocalVariableType
- Includes:
- Base
- Defined in:
- lib/javaclass/attribute.rb
Overview
ローカル変数の型
Instance Attribute Summary collapse
-
#index ⇒ Object
Returns the value of attribute index.
-
#length ⇒ Object
Returns the value of attribute length.
-
#name_index ⇒ Object
Returns the value of attribute name_index.
-
#signature_index ⇒ Object
Returns the value of attribute signature_index.
-
#start_pc ⇒ Object
Returns the value of attribute start_pc.
Instance Method Summary collapse
-
#initialize(java_class, start_pc = nil, length = nil, name_index = nil, signature_index = nil, index = nil) ⇒ LocalVariableType
constructor
A new instance of LocalVariableType.
-
#name ⇒ Object
TODO.
- #signature ⇒ Object
- #to_bytes ⇒ Object
- #to_s ⇒ Object
Methods included from Base
#==, #===, #dump, #eql?, #hash, #to_byte
Constructor Details
#initialize(java_class, start_pc = nil, length = nil, name_index = nil, signature_index = nil, index = nil) ⇒ LocalVariableType
Returns a new instance of LocalVariableType.
1030 1031 1032 1033 1034 1035 1036 1037 1038 |
# File 'lib/javaclass/attribute.rb', line 1030 def initialize( java_class, start_pc=nil, \ length=nil, name_index=nil, signature_index=nil, index=nil ) @java_class=java_class @start_pc = start_pc @length = length @name_index = name_index @signature_index = signature_index @index = index end |
Instance Attribute Details
#index ⇒ Object
Returns the value of attribute index.
1059 1060 1061 |
# File 'lib/javaclass/attribute.rb', line 1059 def index @index end |
#length ⇒ Object
Returns the value of attribute length.
1056 1057 1058 |
# File 'lib/javaclass/attribute.rb', line 1056 def length @length end |
#name_index ⇒ Object
Returns the value of attribute name_index.
1057 1058 1059 |
# File 'lib/javaclass/attribute.rb', line 1057 def name_index @name_index end |
#signature_index ⇒ Object
Returns the value of attribute signature_index.
1058 1059 1060 |
# File 'lib/javaclass/attribute.rb', line 1058 def signature_index @signature_index end |
#start_pc ⇒ Object
Returns the value of attribute start_pc.
1055 1056 1057 |
# File 'lib/javaclass/attribute.rb', line 1055 def start_pc @start_pc end |
Instance Method Details
#name ⇒ Object
TODO
1042 1043 1044 |
# File 'lib/javaclass/attribute.rb', line 1042 def name @java_class.get_constant_value( @name_index ) end |
#signature ⇒ Object
1045 1046 1047 |
# File 'lib/javaclass/attribute.rb', line 1045 def signature @java_class.get_constant_value( @signature_index ) end |
#to_bytes ⇒ Object
1048 1049 1050 1051 1052 1053 1054 |
# File 'lib/javaclass/attribute.rb', line 1048 def to_bytes bytes = to_byte( @start_pc, 2 ) bytes += to_byte( @length, 2 ) bytes += to_byte( @name_index, 2 ) bytes += to_byte( @signature_index, 2 ) bytes += to_byte( @index, 2 ) end |
#to_s ⇒ Object
1039 1040 1041 |
# File 'lib/javaclass/attribute.rb', line 1039 def to_s # TODO end |