Module: JavaClass::Item

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

Instance Method Summary collapse

Instance Method Details

#annotationsObject

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

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



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

Returns:

  • (Boolean)


87
88
89
# File 'lib/javaclass/base.rb', line 87

def deprecated?
  attributes.key? 'Deprecated'
end

#signatureObject

シグネチャを取得する。

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



78
79
80
# File 'lib/javaclass/base.rb', line 78

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