getAnnotations method
Returns all annotations applied to this declaration in source code.
The returned list:
- Preserves declaration order
- Contains fully materialized AnnotationDeclaration instances
Returns an empty list if no annotations are present.
Implementation
@override
List<AnnotationDeclaration> getAnnotations() => List.unmodifiable(_annotations);