# getPodsWithAnnotation<A> method

1. @override

Future<Map<String, Object>> getPodsWithAnnotation<A>(

1. Class<A> type

)
override

Retrieves pods with the specified annotation as a map of name to instance.

Similar to getPodNamesForAnnotation but returns the actual instances.

## Usage Example:

    final scheduledPods = await factory.getPodsWithAnnotation(Class<Scheduled>());

    for (final entry in scheduledPods.entries) {
      final pod = entry.value;
      if (pod is ScheduledTask) {
        await pod.schedule();
      }
    }

@param type The annotation type to look for @return A Future that completes with a map of pod names to instances

## Implementation

    @override
    Future<Map<String, Object>> getPodsWithAnnotation<A>(Class<A> type) async {
      final result = <String, Object>{};
      final podNames = await getPodNamesForAnnotation<A>(type);

      for (final name in podNames) {
        final pod = await getPod(name);
        if (pod is! NullablePod) {
          result[name] = pod;
        }
      }

      return result;
    }