Package com.yahoo.config.model
Class MapConfigModelRegistry
- java.lang.Object
-
- com.yahoo.config.model.ConfigModelRegistry
-
- com.yahoo.config.model.MapConfigModelRegistry
-
public class MapConfigModelRegistry extends ConfigModelRegistry
- Author:
- Ulf Lilleengen
-
-
Constructor Summary
Constructors Constructor Description MapConfigModelRegistry(com.yahoo.component.provider.ComponentRegistry<? extends ConfigModelBuilder> registry)
Constructs a registry of config models, where the components are injected.MapConfigModelRegistry(Collection<? extends ConfigModelBuilder> builderCollection)
Constructs a registry of config models.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConfigModelRegistry
createFromList(ConfigModelBuilder<? extends ConfigModel>... builders)
Create a registry from a variable argument list of builders.Collection<ConfigModelBuilder>
resolve(ConfigModelId id)
Returns the builders this id resolves to both in this and any chained registry.-
Methods inherited from class com.yahoo.config.model.ConfigModelRegistry
chained
-
-
-
-
Constructor Detail
-
MapConfigModelRegistry
@Inject public MapConfigModelRegistry(com.yahoo.component.provider.ComponentRegistry<? extends ConfigModelBuilder> registry)
Constructs a registry of config models, where the components are injected.- Parameters:
registry
- a component registry
-
MapConfigModelRegistry
public MapConfigModelRegistry(Collection<? extends ConfigModelBuilder> builderCollection)
Constructs a registry of config models.- Parameters:
builderCollection
- A collection of builders used to populate the registry.
-
-
Method Detail
-
resolve
public Collection<ConfigModelBuilder> resolve(ConfigModelId id)
Description copied from class:ConfigModelRegistry
Returns the builders this id resolves to both in this and any chained registry.- Specified by:
resolve
in classConfigModelRegistry
- Returns:
- the resolved config model builders, or an empty list (never null) if none
-
createFromList
@SafeVarargs public static ConfigModelRegistry createFromList(ConfigModelBuilder<? extends ConfigModel>... builders)
Create a registry from a variable argument list of builders.- Parameters:
builders
- A variable argument list of builders to use in this map- Returns:
- a ConfigModelRegistry instance.
-
-