Class AutowireFactory

java.lang.Object
com.ultikits.ultitools.context.AutowireFactory

@Internal public class AutowireFactory extends Object
Simple autowire factory to replace Spring's AutowireCapableBeanFactory.
  • Field Details

  • Constructor Details

  • Method Details

    • autowireBean

      public void autowireBean(Object bean)
      Autowire bean dependencies.

      An unresolvable @Autowired(required = true) dependency aborts the owning module: this method throws ContainerException instead of leaving the field null. Other modules are unaffected, because each module owns its own SimpleContainer. @Autowired(required = false) is the documented escape for a genuinely optional dependency, which still resolves to null silently. Autowiring stops at the first unresolvable required field rather than continuing and reporting only the last one. See issue #201 (D-08).

      Parameters:
      bean - the bean to autowire
      Throws:
      ContainerException - if a required = true dependency cannot be resolved