}
return attributeFilter;
}
Iterable<Import<T>> getImports(final Injector injector, final boolean isConcurrent) {
final ServiceRegistry serviceRegistry = registry.get(injector);
final AttributeFilter attributeFilter = getFilter(injector);
final Iterable<Import<T>> imports = serviceRegistry.lookup(clazz, attributeFilter);
// enable outjection, but only if it's going to a different watcher
ServiceWatcher<? super T> serviceWatcher = watcher.get(injector);
if (null != serviceWatcher && serviceRegistry != serviceWatcher) { // NOPMD
final ImportDecorator<? super T> watcherDecorator = decorator.get(injector);
if (null != watcherDecorator) {
// decorate the watcher if necessary, to support decorated watching
serviceWatcher = new DecoratedServiceWatcher<T>(watcherDecorator, serviceWatcher);
}
if (isConcurrent) {
// now apply concurrent behaviour when watching single services
serviceWatcher = new ConcurrentServiceWatcher<T>(imports, serviceWatcher);
}
serviceRegistry.watch(clazz, attributeFilter, serviceWatcher);
}
return imports;
}