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



120
121
122
# File 'lib/bitescript/mirror.rb', line 120

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

#annotationsObject



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

def annotations
  @annotations ||= {}
end

#declaredAnnotationsObject



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_annotationsObject



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

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