Package com.ultikits.ultitools.context
Class AutowireFactory
java.lang.Object
com.ultikits.ultitools.context.AutowireFactory
Simple autowire factory to replace Spring's AutowireCapableBeanFactory.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
container
-
-
Constructor Details
-
AutowireFactory
-
-
Method Details
-
autowireBean
Autowire bean dependencies.An unresolvable
@Autowired(required = true)dependency aborts the owning module: this method throwsContainerExceptioninstead of leaving the fieldnull. Other modules are unaffected, because each module owns its ownSimpleContainer.@Autowired(required = false)is the documented escape for a genuinely optional dependency, which still resolves tonullsilently. 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 arequired = truedependency cannot be resolved
-