code: public ProxyTargetLocator createProxyTargetLocator(BundleContext callingContext, Field field, Class<?> page,
              Map<String, String> overwrites) {
          BundleContext context;
          if (page.getClassLoader() instanceof BundleReference) {
              // Fetch the Bundlecontext of the page class to locate the service
              BundleReference reference = (BundleReference) page.getClassLoader();
              context = reference.getBundle().getBundleContext();
              LOGGER.debug("Using the Bundlereference of class {} for locating services", page);
          } else {
              context = callingContext;
              LOGGER.debug("Using the PAX Wicket BundlereContext for locating services");
          }
          Filter filter = getFilter(context, field);
          // is it am Iterable?
          Class<?> type = field.getType();
          if (type.equals(Iterable.class)) {
              Class<?> argument = BundleAnalysingComponentInstantiationListener.getGenericTypeArgument(field);
              LOGGER.debug("Inject Iterable for type {}", argument);
              return new StaticProxyTargetLocator(createIterable(argument, filter, context), page);
          }
          // or a supported collection...
          if (type.equals(Collection.class) || type.equals(Set.class) || type.equals(List.class)) {
              Class<?> argument = BundleAnalysingComponentInstantiationListener.getGenericTypeArgument(field);
              LOGGER.debug("Inject Collection, Set or List for type {}", argument);
              return new StaticProxyTargetLocator(createCollection(argument, filter, context), page);
          }
          OSGiServiceRegistryProxyTargetLocator locator =
              new OSGiServiceRegistryProxyTargetLocator(context, filter,
                  type, page);
          if (locator.fetchReferences() != null) {
              return locator;
          } else {
              return null;
          }
      }
docs: {@inheritDoc}