Module: BiteScript::ASM::Annotated
- Included in:
- ClassMirror, FieldMirror, MethodMirror
- Defined in:
- lib/bitescript/mirror.rb,
lib/bitescript/asm3/mirror.rb
Instance Method Summary collapse
- #addAnnotation(annotation) ⇒ Object
- #annotations ⇒ Object
- #declaredAnnotations ⇒ Object
- #getDeclaredAnnotation(name) ⇒ Object
- #inspect_annotations ⇒ Object
Instance Method Details
#addAnnotation(annotation) ⇒ Object
120 121 122 |
# File 'lib/bitescript/mirror.rb', line 120 def addAnnotation(annotation) annotations[annotation.type.class_name] = annotation end |
#annotations ⇒ Object
116 117 118 |
# File 'lib/bitescript/mirror.rb', line 116 def annotations @annotations ||= {} end |
#declaredAnnotations ⇒ Object
128 129 130 |
# File 'lib/bitescript/mirror.rb', line 128 def declaredAnnotations annotations.values end |
#getDeclaredAnnotation(name) ⇒ Object
124 125 126 |
# File 'lib/bitescript/mirror.rb', line 124 def getDeclaredAnnotation(name) annotations[name] end |
#inspect_annotations ⇒ Object
132 133 134 |
# File 'lib/bitescript/mirror.rb', line 132 def inspect_annotations declaredAnnotations.map {|a| a.inspect}.join('') end |