getAnnotations<A> abstract method
Gets all annotations of a specific type.
Type Parameters:
A
: The annotation type to filter for
Returns:
- A list of all matching annotation instances
- Empty list if none found
Note: Useful for repeatable annotations that may appear multiple times.
Example:
final routes = method.getDirectAnnotations<Route>();
for (final route in routes) {
print('Route path: ${route.path}');
}
Implementation
List<A> getAnnotations<A>();