Class ProviderResolver
java.lang.Object
build.codemodel.dependency.injection.ProviderResolver
A
Resolver of JSR-330 Provider-based specifications of Dependencys.
NOTE: This Resolver must be added to Contexts that wish to be used in a JSR-330 compliant manner
with Provider annotations.
- Since:
- Oct-2024
- Author:
- brian.oliver
-
Constructor Summary
ConstructorsConstructorDescriptionProviderResolver(InjectionFramework injectionFramework, Context context) Constructs aProviderResolverfor a specifiedContext -
Method Summary
Modifier and TypeMethodDescriptionresolve(Dependency dependency) Attempts to resolve a value for the type specified by theDependency.
-
Constructor Details
-
ProviderResolver
Constructs aProviderResolverfor a specifiedContext- Parameters:
injectionFramework- theInjectionFrameworkcontext- theContext
-
-
Method Details
-
resolve
Description copied from interface:ResolverAttempts to resolve a value for the type specified by theDependency.- Specified by:
resolvein interfaceResolver<jakarta.inject.Provider<Object>>- Parameters:
dependency- theDependency- Returns:
- the
Optionalvalue if resolvable,Optional.empty()otherwise
-