Interface TypedConfig<T>
-
- Type Parameters:
T- the config type
- All Known Implementing Classes:
AnnotationTypedConfig
@ProviderType public interface TypedConfig<T>Represents a single config entry within aConfigCollection. It has its own config type, which may be a annotation type or an interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <U> Stream<U>configStream(@NotNull Class<U> otherType)Returns a 0- or 1-element config stream (containing only this entry's config) depending on whether this entry'sgetType()matches the providedotherType.TgetConfig()The config object.@NotNull Map<String,Object>getConfigMap()Convert the config instance into a traditional config property map.@NotNull Class<T>getType()The config type.default <U> Stream<TypedConfig<U>>stream(@NotNull Class<U> otherType)Returns a 0- or 1-element entry stream (containing only this entry) depending on whether this entry'sgetType()matches the providedotherType.
-
-
-
Method Detail
-
getType
@NotNull @NotNull Class<T> getType()
The config type. This will only be an annotation type or an interface type.- Returns:
- the config type
-
getConfig
@NotNull T getConfig()
The config object. This is the value that is expected to be passed to anActivate-annotated SCR component constructor.- Returns:
- the config object
-
getConfigMap
@NotNull @NotNull Map<String,Object> getConfigMap()
Convert the config instance into a traditional config property map.- Returns:
- a property map
-
stream
default <U> Stream<TypedConfig<U>> stream(@NotNull @NotNull Class<U> otherType)
Returns a 0- or 1-element entry stream (containing only this entry) depending on whether this entry'sgetType()matches the providedotherType. This is a convenience method for use inStream.flatMap(Function)expressions on the containingConfigCollection.stream().- Type Parameters:
U- the other type- Parameters:
otherType- the other type to filter by- Returns:
- a 0- or 1-element entry stream (containing only this entry)
-
configStream
default <U> Stream<U> configStream(@NotNull @NotNull Class<U> otherType)
Returns a 0- or 1-element config stream (containing only this entry's config) depending on whether this entry'sgetType()matches the providedotherType. This is a convenience method for use inStream.flatMap(Function)expressions on the containingConfigCollection.stream().- Type Parameters:
U- the other type- Parameters:
otherType- the other type to filter by- Returns:
- a 0- or 1-element config stream (containing only this entry's config)
-
-