class FieldInjections {

    List<FieldSetter> setters( Class<?> cls ) throws ProcedureException
    {
        List<FieldSetter> setters = new LinkedList<>();
        Class<?> currentClass = cls;

        do
        {
            for ( Field field : currentClass.getDeclaredFields() )
            {
                //ignore synthetic fields
                if ( field.isSynthetic() )
                {
                    continue;
                }
                if ( Modifier.isStatic( field.getModifiers() ) )
                {
                    if ( field.isAnnotationPresent( Context.class ) )
                    {
                        throw new ProcedureException( Status.Procedure.ProcedureRegistrationFailed,
                                 "The field `%s` in the class named `%s` is annotated as a @Context field,%n" +
                                "but it is static. @Context fields must be public, non-final and non-static,%n" +
                                "because they are reset each time a procedure is invoked.",
                                field.getName(), cls.getSimpleName() );
                    }
                    continue;
                }

                assertValidForInjection( cls, field );
                setters.add( createInjector( cls, field ) );
            }
        }
        while ( (currentClass = currentClass.getSuperclass()) != null );

        return setters;
    }

      FieldInjections( ComponentRegistry components );

}