Class: JavaClass::ClassAnnotationElementValue
- Inherits:
-
AnnotationElementValue
- Object
- AnnotationElementValue
- JavaClass::ClassAnnotationElementValue
- Defined in:
- lib/javaclass/attribute.rb
Overview
クラス型のアノテーションデータ
Instance Attribute Summary collapse
-
#class_info_index ⇒ Object
Returns the value of attribute class_info_index.
Attributes inherited from AnnotationElementValue
Instance Method Summary collapse
- #class_info ⇒ Object
-
#initialize(java_class, tag = nil, class_info_index = nil) ⇒ ClassAnnotationElementValue
constructor
コンストラクタ.
- #to_bytes ⇒ Object
- #to_s ⇒ Object
Methods included from Converters
convert_code, convert_field_descriptor, convert_method_descriptor
Methods included from Base
#==, #===, #dump, #eql?, #hash, #to_byte
Constructor Details
#initialize(java_class, tag = nil, class_info_index = nil) ⇒ ClassAnnotationElementValue
コンストラクタ
*java_class::属性の所有者であるJavaクラス *tag::データの種別を示すconstant_poolのインデックス *class_info_index::クラスを示すconstant_poolのインデックス
621 622 623 624 |
# File 'lib/javaclass/attribute.rb', line 621 def initialize( java_class, tag=nil, class_info_index=nil ) super( java_class, tag ) @class_info_index = class_info_index end |
Instance Attribute Details
#class_info_index ⇒ Object
Returns the value of attribute class_info_index.
636 637 638 |
# File 'lib/javaclass/attribute.rb', line 636 def class_info_index @class_info_index end |
Instance Method Details
#class_info ⇒ Object
625 626 627 |
# File 'lib/javaclass/attribute.rb', line 625 def class_info @java_class.get_constant_value(@class_info_index) end |
#to_bytes ⇒ Object
631 632 633 634 |
# File 'lib/javaclass/attribute.rb', line 631 def to_bytes bytes = super bytes += to_byte( @class_info_index, 2) end |
#to_s ⇒ Object
628 629 630 |
# File 'lib/javaclass/attribute.rb', line 628 def to_s convert_field_descriptor(class_info) << ".class" end |