Module: BiteScript::ASM::Annotated

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

Instance Method Summary collapse

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

#annotationsObject



115
116
117
# File 'lib/bitescript/mirror.rb', line 115

def annotations
  @annotations ||= {}
end

#declaredAnnotationsObject



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_annotationsObject



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

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