getAllAnnotations abstract method

List<Annotation> getAllAnnotations()

Returns:

  • A list of all Annotation instances on this element
  • Empty list if no annotations exist

Note: Includes both runtime-retained and source-only annotations when available in the reflection environment.

Example:

for (final ann in element.getAllDirectAnnotations()) {
  print('Found annotation: ${ann.getSignature()}');
}

Implementation

List<Annotation> getAllAnnotations();