Class ConfigValueInjector
java.lang.Object
tech.guilhermekaua.spigotboot.config.injector.ConfigValueInjector
- All Implemented Interfaces:
CustomInjector
Custom injector that wires
ConfigValue onto fields and constructor parameters of
DI-managed beans.
supports(InjectionPoint) matches strictly on the presence of ConfigValue so it
never hijacks unrelated injection points. resolve(InjectionPoint) always returns a
handled result (or throws) — it never returns
not-handled, because that would let the framework fall
back to by-type bean resolution and silently mis-inject or null the field.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigValueInjector(@NotNull DefaultConfigManager configManager) Creates the injector. -
Method Summary
Modifier and TypeMethodDescriptionintgetOrder()@NotNull InjectionResultresolve(@NotNull InjectionPoint injectionPoint) booleansupports(@NotNull InjectionPoint injectionPoint)
-
Constructor Details
-
ConfigValueInjector
Creates the injector.- Parameters:
configManager- the config manager, not null
-
-
Method Details
-
supports
- Specified by:
supportsin interfaceCustomInjector
-
resolve
- Specified by:
resolvein interfaceCustomInjector
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceCustomInjector
-