Class Injector
java.lang.Object
page.codeberg.rrangelo.contextfx.components.Injector
- Direct Known Subclasses:
ReactiveInjector
Orchestrates the dependency injection phase for all registered component types.
After component discovery and registration by Scanner, Injector drives
the injection phase by delegating to the type-specific injectors in the following order:
ModelInjector— injects dependencies into@Modelcomponents.ComponentInjector— injects dependencies into@Componentcomponents.ServiceInjector— injects dependencies into@Servicecomponents.ControllerInjector— injects dependencies into@Controllercomponents.ViewInjector— injects dependencies into@Viewcomponents.
The ordering ensures that lower-level dependencies (models, services) are fully wired before higher-level components (controllers, views) are processed.
- Author:
- Ramon Rangel Osorio <ramon.rangel@protonmail.com>
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidinject()Runs dependency injection across all component types in the correct dependency order.
-
Constructor Details
-
Injector
Creates anInjectorbound to the givenScannerresult set.- Parameters:
scanner- the scanner whose discovered class list will be processed during injection
-
-
Method Details
-
inject
public final void inject()Runs dependency injection across all component types in the correct dependency order. Models are injected first so that controllers and views can safely reference them.
-