Module: JavaClass::Item
Instance Method Summary collapse
-
#annotations ⇒ Object
設定されているアノテーションを配列で取得する。.
-
#deprecated? ⇒ Boolean
Deprecatedかどうか評価する。.
-
#signature ⇒ Object
シグネチャを取得する。.
Instance Method Details
#annotations ⇒ Object
設定されているアノテーションを配列で取得する。
戻り値::アノテーションの配列
96 97 98 99 100 101 |
# File 'lib/javaclass/base.rb', line 96 def annotations ['RuntimeVisibleAnnotations', 'RuntimeInvisibleAnnotations'].inject([]) { |l, k| l.concat( attributes[k].annotations ) if attributes.key? k l } end |
#deprecated? ⇒ Boolean
Deprecatedかどうか評価する。
戻り値::Deprecatedであればtrue
87 88 89 |
# File 'lib/javaclass/base.rb', line 87 def deprecated? attributes.key? 'Deprecated' end |
#signature ⇒ Object
シグネチャを取得する。
戻り値::シグネチャ。定義されていない場合nil
78 79 80 |
# File 'lib/javaclass/base.rb', line 78 def signature (attributes.key? "Signature") ? attributes["Signature"].signature : nil end |