bool hasAnnotation(final String annotation) { return metadata2.annotations.indexWhere( (final md) => md.element2?.displayName == annotation, ) >= 0; }