Module: JavaClass::Item
Instance Method Summary collapse
-
#annotations ⇒ Object
設定されているアノテーションを配列で取得する。.
-
#deprecated? ⇒ Boolean
Deprecatedかどうか評価する。.
-
#signature ⇒ Object
シグネチャを取得する。.
Instance Method Details
#annotations ⇒ Object
設定されているアノテーションを配列で取得する。
戻り値::アノテーションの配列
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
116 117 118 |
# File 'lib/javaclass/base.rb', line 116 def deprecated? attributes.key? 'Deprecated' end |
#signature ⇒ Object
シグネチャを取得する。
戻り値::シグネチャ。定義されていない場合nil
107 108 109 |
# File 'lib/javaclass/base.rb', line 107 def signature (attributes.key? "Signature") ? attributes["Signature"].signature : nil end |