class Java::Annotatable

Attributes

annotations[R]

Public Class Methods

new(annotations) click to toggle source
# File lib/java_dissassembler/annotatable.rb, line 4
def initialize(annotations)
  @annotations = annotations
end

Public Instance Methods

get_annotation(annotation_name) click to toggle source
# File lib/java_dissassembler/annotatable.rb, line 12
def get_annotation(annotation_name)
  hash = @annotations.find { |a| a.keys.include?(annotation_name) }
  hash[annotation_name] unless hash.nil?
end
has_annotation?(annotation_name) click to toggle source
# File lib/java_dissassembler/annotatable.rb, line 8
def has_annotation?(annotation_name)
  @annotations.any? { |hash| hash.keys.any? { |key| key == annotation_name } }
end