class FieldInjector implements Injector {

    private Ioc   ioc;
    private Field field;

    public FieldInjector(Ioc ioc, Field field) {
        this.ioc = ioc;
        this.field = field;
    }

    public Class<?> getType() {
        return field.getType();
    }

    public boolean isSingleton() {
        return IocKit.isSingleton(field.getType());
    }

    @Override
    public void injection(Object bean) {<FILL_FUNCTION_BODY>}

    @Override
    public void injection(Object bean, Object value) {
        try {
            field.setAccessible(true);
            field.set(bean, value);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }

    public boolean hasInjectFields() {
        return field.getType().getDeclaredFields().length > 0;
    }

}

        try {
            Class<?> fieldType = field.getType();
            Object   value     = ioc.getBean(fieldType);
            if (value == null) {
                throw new IllegalStateException("Can't inject bean: " + fieldType.getName() + " for field: " + field);
            }
            injection(bean, value);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    
<no_super_class>