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.
1034 1035 1036 1037 1038 1039 1040 1041 1042 |
# File 'lib/javaclass/attribute.rb', line 1034 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.
1063 1064 1065 |
# File 'lib/javaclass/attribute.rb', line 1063 def index @index end |
#length ⇒ Object
Returns the value of attribute length.
1060 1061 1062 |
# File 'lib/javaclass/attribute.rb', line 1060 def length @length end |
#name_index ⇒ Object
Returns the value of attribute name_index.
1061 1062 1063 |
# File 'lib/javaclass/attribute.rb', line 1061 def name_index @name_index end |
#signature_index ⇒ Object
Returns the value of attribute signature_index.
1062 1063 1064 |
# File 'lib/javaclass/attribute.rb', line 1062 def signature_index @signature_index end |
#start_pc ⇒ Object
Returns the value of attribute start_pc.
1059 1060 1061 |
# File 'lib/javaclass/attribute.rb', line 1059 def start_pc @start_pc end |
Instance Method Details
#name ⇒ Object
TODO
1046 1047 1048 |
# File 'lib/javaclass/attribute.rb', line 1046 def name @java_class.get_constant_value( @name_index ) end |
#signature ⇒ Object
1049 1050 1051 |
# File 'lib/javaclass/attribute.rb', line 1049 def signature @java_class.get_constant_value( @signature_index ) end |
#to_bytes ⇒ Object
1052 1053 1054 1055 1056 1057 1058 |
# File 'lib/javaclass/attribute.rb', line 1052 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
1043 1044 1045 |
# File 'lib/javaclass/attribute.rb', line 1043 def to_s # TODO end |