Module: JavaClass::Item

Included in:
Class, Member
Defined in:
lib/javaclass/base.rb

Instance Method Summary collapse

Instance Method Details

#annotationsObject

設定されているアノテーションを配列で取得する。

戻り値::アノテーションの配列



125
126
127
128
129
130
# File 'lib/javaclass/base.rb', line 125

def annotations
  ['RuntimeVisibleAnnotations', 'RuntimeInvisibleAnnotations'].inject([]) { |l, k|
      l.concat( attributes[k].annotations ) if attributes.key? k
      l
  }
end

#deprecated?Boolean

Deprecatedかどうか評価する。

戻り値::Deprecatedであればtrue

Returns:

  • (Boolean)


116
117
118
# File 'lib/javaclass/base.rb', line 116

def deprecated?
  attributes.key? 'Deprecated'
end

#signatureObject

シグネチャを取得する。

戻り値::シグネチャ。定義されていない場合nil



107
108
109
# File 'lib/javaclass/base.rb', line 107

def signature
  (attributes.key? "Signature") ? attributes["Signature"].signature : nil
end