annotatedWithExact method

Iterable<AnnotatedElement> annotatedWithExact(
  1. TypeChecker checker,
  2. {bool throwOnUnresolved = true}
)

All of the declarations in this library annotated with exactly checker.

Implementation

Iterable<AnnotatedElement> annotatedWithExact(
  TypeChecker checker, {
  bool throwOnUnresolved = true,
}) sync* {
  for (final element in allElements) {
    final annotation = checker.firstAnnotationOfExact(
      element,
      throwOnUnresolved: throwOnUnresolved,
    );
    if (annotation != null) {
      yield AnnotatedElement(ConstantReader(annotation), element);
    }
  }
}