Class: JavaClass::AnnotationElementValue

Inherits:
Object
  • Object
show all
Includes:
Base, Converters
Defined in:
lib/javaclass/attribute.rb

Overview

アノテーションデータの基底クラス

Instance Attribute Summary collapse

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) ⇒ AnnotationElementValue

コンストラクタ

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



534
535
536
537
# File 'lib/javaclass/attribute.rb', line 534

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

Instance Attribute Details

#tagObject

Returns the value of attribute tag.



542
543
544
# File 'lib/javaclass/attribute.rb', line 542

def tag
  @tag
end

Instance Method Details

#to_bytesObject



538
539
540
# File 'lib/javaclass/attribute.rb', line 538

def to_bytes
  to_byte( @tag, 1)
end