wro4j-core/src/main/java/ro/isdc/wro/model/group/processor/Injector.java
private void processInjectAnnotation(final Object object) {
    try {
      final Collection<Field> fields = getAllFields(object);
      for (final Field field : fields) {
        if (field.isAnnotationPresent(Inject.class)) {
          if (!acceptAnnotatedField(object, field)) {
            final String message = String.format(
                "@Inject cannot be applied on object: %s to field of type: %s using injector %s", object,
                field.getType(), this);
            LOG.error(message + ". Supported types are: {}", map.keySet());
            throw new WroRuntimeException(message);
          }
        }
      }
      // handle special cases like decorators. Perform recursive injection
      if (object instanceof ObjectDecorator) {
        processInjectAnnotation(((ObjectDecorator<?>) object).getDecoratedObject());
      }
    } catch (final Exception e) {
      LOG.error("Error while scanning @Inject annotation", e);
      throw WroRuntimeException.wrap(e, "Exception while trying to process @Inject annotation on object: " + object);
    }
  }
private void processInjectAnnotation(final Object object) {
    try {
      final Collection<Field> fields = getAllFields(object);
      for (final Field field : fields) {
        if (field.isAnnotationPresent(Inject.class)) {
          if (!acceptAnnotatedField(object, field)) {
            final String message = String.format(
                "@Inject cannot be applied on object: %s to field of type: %s using injector %s", object,
                field.getType(), this);
            LOG.error(message + ". Supported types are: {}", map.keySet());
            throw new WroRuntimeException(message);
          }
        }
      }
      // handle special cases like decorators. Perform recursive injection
      if (object instanceof ObjectDecorator) {
        processInjectAnnotation(((ObjectDecorator<?>) object).getDecoratedObject());
      }
    } catch (final Exception e) {
      LOG.error("Error while scanning @Inject annotation", e);
      throw WroRuntimeException.wrap(e, "Exception while trying to process @Inject annotation on object: " + object);
    }
  }
private void processInjectAnnotation ( final Object object ) { try { final Collection < Field > fields = getAllFields ( object ) ; for ( final Field field : fields ) { if ( field . isAnnotationPresent ( Inject . class ) ) { if ( ! acceptAnnotatedField ( object , field ) ) { final String message = String . format ( "@Inject cannot be applied on object: %s to field of type: %s using injector %s" , object , field . getType ( ) , this ) ; LOG . error ( message + ". Supported types are: {}" , map . keySet ( ) ) ; throw new WroRuntimeException ( message ) ; } } } // handle special cases like decorators. Perform recursive injection
 if ( object instanceof ObjectDecorator ) { processInjectAnnotation ( ( ( ObjectDecorator < ? > ) object ) . getDecoratedObject ( ) ) ; } } catch ( final Exception e ) { LOG . error ( "Error while scanning @Inject annotation" , e ) ; throw WroRuntimeException . wrap ( e , "Exception while trying to process @Inject annotation on object: " + object ) ; } }
Check for each field from the passed object if @Inject annotation is present & inject the required field if
supported, otherwise warns about invalid usage.

@param object
to check for annotation presence.
Check for each field from the passed object if @Inject annotation is present & inject the required field if supported otherwise warns about invalid usage .