code: protected void injectServices(SlingBean component) throws IllegalAccessException {
          final Field[] declaredFields;
          if (fieldCache.containsKey(component.getClass())) {
              declaredFields = fieldCache.get(component.getClass());
          } else {
              declaredFields = component.getClass().getDeclaredFields();
              fieldCache.put(component.getClass(), declaredFields);
          }
          for (Field field : declaredFields) {
              if (field.isAnnotationPresent(Inject.class)) {
                  if (!field.isAccessible()) {
                      field.setAccessible(true);
                  }
                  if (null == field.get(component)) { // if not initialized already by Sling-Models
                      String filter = null;
                      if (field.isAnnotationPresent(Named.class)) {
                          Named name = field.getAnnotation(Named.class);
                          filter = "(service.pid=" + name.value() + ")";
                      }
                      Class<?> typeOfField = field.getType();
                      Object o = retrieveFirstServiceOfType(typeOfField, filter);
                      field.set(component, o);
                  }
              }
          }
      }
docs: Inject OSGI services for attributes marked for injection in a new component instance, if not already
  initialized e.g. by Sling-Models.