java.lang.Object
io.helidon.builder.config.spi.HelidonConfigResolver
- All Implemented Interfaces:
ConfigResolver,ConfigResolverProvider
@Singleton
public class HelidonConfigResolver
extends Object
implements ConfigResolver, ConfigResolverProvider
The basic implementation of
ConfigResolver simply resolves against Config directly,
not "full" Helidon config.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionProvide theConfigResolverimplementation.<T> Optional<T>of(ResolutionContext ctx, Map<String, Map<String, Object>> meta, ConfigResolverRequest<T> request) Resolves aConfigBeansingular element value from the backingConfig.<T> Optional<Collection<T>>ofCollection(ResolutionContext ctx, Map<String, Map<String, Object>> meta, ConfigResolverRequest<T> request) Resolves aConfigBeancollection-like element value from the backingConfig.ofMap(ResolutionContext ctx, Map<String, Map<String, Object>> meta, ConfigResolverMapRequest<K, V> request) Resolves aConfigBeanmap-like element value from the backingConfig.
-
Field Details
-
TAG_META
Tag that represents meta information about the attribute. Used in the maps for various methods herein.- See Also:
-
TAG_COMPONENT_TYPE
Tag that represents the component type.- See Also:
-
-
Constructor Details
-
HelidonConfigResolver
Deprecated.needed for Java service loaderDefault constructor, service loader invoked.
-
-
Method Details
-
configResolver
Description copied from interface:ConfigResolverProviderProvide theConfigResolverimplementation.- Specified by:
configResolverin interfaceConfigResolverProvider- Returns:
- config resolver
-
of
public <T> Optional<T> of(ResolutionContext ctx, Map<String, Map<String, Object>> meta, ConfigResolverRequest<T> request) Description copied from interface:ConfigResolverResolves aConfigBeansingular element value from the backingConfig.- Specified by:
ofin interfaceConfigResolver- Type Parameters:
T- the attribute value type being resolved in the request- Parameters:
ctx- the resolution contextmeta- the meta attributes for this config beanrequest- the request- Returns:
- the resolved value or empty if unable to resolve the request
-
ofCollection
public <T> Optional<Collection<T>> ofCollection(ResolutionContext ctx, Map<String, Map<String, Object>> meta, ConfigResolverRequest<T> request) Description copied from interface:ConfigResolverResolves aConfigBeancollection-like element value from the backingConfig.- Specified by:
ofCollectionin interfaceConfigResolver- Type Parameters:
T- the attribute value type being resolved in the request- Parameters:
ctx- the resolution contextmeta- the meta attributes for this config beanrequest- the request- Returns:
- the resolved value or empty if unable to resolve the request
-
ofMap
public <K,V> Optional<Map<K,V>> ofMap(ResolutionContext ctx, Map<String, Map<String, Object>> meta, ConfigResolverMapRequest<K, V> request) Description copied from interface:ConfigResolverResolves aConfigBeanmap-like element value from the backingConfig.- Specified by:
ofMapin interfaceConfigResolver- Type Parameters:
K- the map attribute key type being resolved in the requestV- the map attribute value type being resolved in the request- Parameters:
ctx- the resolution contextmeta- the meta attributes for this config beanrequest- the request- Returns:
- the resolved value or empty if unable to resolve the request
-