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
134 135 136 |
# File 'lib/bitescript/mirror.rb', line 134 def addAnnotation(annotation) annotations[annotation.type.class_name] = annotation end |
#annotations ⇒ Object
130 131 132 |
# File 'lib/bitescript/mirror.rb', line 130 def annotations @annotations ||= {} end |
#declaredAnnotations ⇒ Object
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_annotations ⇒ Object
146 147 148 |
# File 'lib/bitescript/mirror.rb', line 146 def inspect_annotations declaredAnnotations.map {|a| a.inspect}.join('') end |