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 a
ConfigCollection
. It has its own config type, which may be a
annotation type or an interface.-
Method Summary
Modifier and TypeMethodDescriptiondefault <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
.The config object.Convert the config instance into a traditional config property map.getType()
The config type.default <U> Stream<TypedConfig<U>>
Returns a 0- or 1-element entry stream (containing only this entry) depending on whether this entry'sgetType()
matches the providedotherType
.
-
Method Details
-
getType
The config type. This will only be an annotation type or an interface type.- Returns:
- the config type
-
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
Convert the config instance into a traditional config property map.- Returns:
- a property map
-
stream
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
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)
-