Class ConfigValueResolver
java.lang.Object
tech.guilhermekaua.spigotboot.config.injector.ConfigValueResolver
Resolves the value for a
@ConfigValue-annotated injection point.
Holds all resolution logic so ConfigValueInjector stays a thin adapter. Detects the
addressing mode, builds the lookup path, reads the value (or the default) through
DefaultConfigManager, and fails fast with a ConfigException naming the injection
site on any misconfiguration.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigValueResolver(@NotNull DefaultConfigManager configManager) Creates a resolver. -
Method Summary
Modifier and TypeMethodDescription@Nullable Objectresolve(@NotNull InjectionPoint injectionPoint) Resolves the value to inject for the given@ConfigValueinjection point.
-
Constructor Details
-
ConfigValueResolver
Creates a resolver.- Parameters:
configManager- the config manager, not null
-
-
Method Details
-
resolve
Resolves the value to inject for the given@ConfigValueinjection point.- Parameters:
injectionPoint- the injection point, not null- Returns:
- the resolved value (may be null only if a registered serializer yields null)
- Throws:
ConfigException- on any misconfiguration or missing required value
-