Module: BiteScript::ASM::Annotated
- Included in:
- ClassMirror, FieldMirror, MethodMirror
- Defined in:
- lib/bitescript/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
119 120 121 |
# File 'lib/bitescript/mirror.rb', line 119 def addAnnotation(annotation) annotations[annotation.type.class_name] = annotation end |
#annotations ⇒ Object
115 116 117 |
# File 'lib/bitescript/mirror.rb', line 115 def annotations @annotations ||= {} end |
#declaredAnnotations ⇒ Object
127 128 129 |
# File 'lib/bitescript/mirror.rb', line 127 def declaredAnnotations annotations.values end |
#getDeclaredAnnotation(name) ⇒ Object
123 124 125 |
# File 'lib/bitescript/mirror.rb', line 123 def getDeclaredAnnotation(name) annotations[name] end |
#inspect_annotations ⇒ Object
131 132 133 |
# File 'lib/bitescript/mirror.rb', line 131 def inspect_annotations declaredAnnotations.map {|a| a.inspect}.join('') end |