Module: BiteScript::ASM::Annotated

Included in:
ClassMirror, FieldMirror, MethodMirror
Defined in:
lib/bitescript/mirror.rb,
lib/bitescript/asm3/mirror.rb

Instance Method Summary collapse

Instance Method Details

#addAnnotation(annotation) ⇒ Object



134
135
136
# File 'lib/bitescript/mirror.rb', line 134

def addAnnotation(annotation)
  annotations[annotation.type.class_name] = annotation
end

#annotationsObject



130
131
132
# File 'lib/bitescript/mirror.rb', line 130

def annotations
  @annotations ||= {}
end

#declaredAnnotationsObject



142
143
144
# File 'lib/bitescript/mirror.rb', line 142

def declaredAnnotations
  annotations.values
end

#getDeclaredAnnotation(name) ⇒ Object



138
139
140
# File 'lib/bitescript/mirror.rb', line 138

def getDeclaredAnnotation(name)
  annotations[name]
end

#inspect_annotationsObject



146
147
148
# File 'lib/bitescript/mirror.rb', line 146

def inspect_annotations
  declaredAnnotations.map {|a| a.inspect}.join('')
end