getAllDirectAnnotations abstract method
Gets all annotations applied to this element.
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> getAllDirectAnnotations();