Class: JavaClass::AnnotationAnnotationElementValue

Inherits:
AnnotationElementValue show all
Defined in:
lib/javaclass/attribute.rb

Overview

アノテーション型のアノテーションデータ

Instance Attribute Summary collapse

Attributes inherited from AnnotationElementValue

#tag

Instance Method Summary collapse

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, annotation = nil) ⇒ AnnotationAnnotationElementValue

コンストラクタ

*java_class::属性の所有者であるJavaクラス*tag::データの種別を示すconstant_poolのインデックス*annotation::アノテーション



650
651
652
653
# File 'lib/javaclass/attribute.rb', line 650

def initialize( java_class, tag=nil, annotation=nil  )
  super( java_class, tag )
  @annotation = annotation
end

Instance Attribute Details

#annotationObject

Returns the value of attribute annotation.



662
663
664
# File 'lib/javaclass/attribute.rb', line 662

def annotation
  @annotation
end

Instance Method Details

#to_bytesObject



657
658
659
660
# File 'lib/javaclass/attribute.rb', line 657

def to_bytes
  bytes = super
  bytes += annotation.to_bytes()
end

#to_sObject



654
655
656
# File 'lib/javaclass/attribute.rb', line 654

def to_s
  @annotation.to_s
end