Interface ConditionalDescriptorRegistry
-
- All Known Subinterfaces:
ComponentFactory
- All Known Implementing Classes:
ContextAwareComponentFactory
,DefaultComponentFactory
,DelegatingComponentFactory
public interface ConditionalDescriptorRegistry
The main interface that defines methods to find registeredComponentDescriptor
for enable components.- See Also:
Condition
-
-
Method Summary
-
-
-
Method Detail
-
findAllDescriptorsByClass
<T> Collection<ComponentDescriptor<T>> findAllDescriptorsByClass(Class<T> type, ComponentConditionalContext context)
Finds allComponentDescriptor
registered for the specified type.- Type Parameters:
T
- the component type.- Parameters:
type
- the component class.- Returns:
- the collection of
ComponentDescriptor
.
-
findAllDescriptorsByClass
<T> Collection<ComponentDescriptor<T>> findAllDescriptorsByClass(Class<T> type, ComponentConditionalContext context, Qualifier<T> qualifier)
Finds allComponentDescriptor
registered for the specified type.- Type Parameters:
T
- the component type.- Parameters:
type
- the component class.- Returns:
- the collection of
ComponentDescriptor
.
-
findAllDescriptorsByAlias
<T> Collection<ComponentDescriptor<T>> findAllDescriptorsByAlias(String alias, ComponentConditionalContext context)
Finds allComponentDescriptor
registered for the specified alias.- Type Parameters:
T
- the component type.- Parameters:
alias
- the fully qualified class name or an alias of the component.- Returns:
- the collection of
ComponentDescriptor
.
-
findAllDescriptorsByAlias
<T> Collection<ComponentDescriptor<T>> findAllDescriptorsByAlias(String alias, ComponentConditionalContext context, Qualifier<T> qualifier)
Finds allComponentDescriptor
registered for the specified alias.- Type Parameters:
T
- the component type.- Parameters:
alias
- the fully qualified class name or an alias of the component.- Returns:
- the collection of
ComponentDescriptor
.
-
findDescriptorByAlias
<T> Optional<ComponentDescriptor<T>> findDescriptorByAlias(String alias, ComponentConditionalContext context)
Finds aComponentDescriptor
for the specified type.- Type Parameters:
T
- the component type.- Parameters:
alias
- the fully qualified class name or an alias of the component.- Returns:
- the optional
ComponentDescriptor
instance. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.
-
findDescriptorByAlias
<T> Optional<ComponentDescriptor<T>> findDescriptorByAlias(String alias, ComponentConditionalContext context, Qualifier<T> qualifier)
Finds aComponentDescriptor
for the specified type and options.- Type Parameters:
T
- the component type.- Parameters:
alias
- the fully qualified class name or an alias of the component.qualifier
- the options used to qualified the component.- Returns:
- the optional
ComponentDescriptor
instance. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.
-
findDescriptorByClass
<T> Optional<ComponentDescriptor<T>> findDescriptorByClass(Class<T> type, ComponentConditionalContext context)
Finds aComponentDescriptor
for the specified type.- Type Parameters:
T
- the component type.- Parameters:
type
- the component class.- Returns:
- the optional
ComponentDescriptor
instance. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.
-
findDescriptorByClass
<T> Optional<ComponentDescriptor<T>> findDescriptorByClass(Class<T> type, ComponentConditionalContext context, Qualifier<T> qualifier)
Finds aComponentDescriptor
for the specified type and options.- Type Parameters:
T
- the component type.- Parameters:
type
- the fully qualified class name or an alias of the component.qualifier
- the options used to qualified the component.- Returns:
- the optional
ComponentDescriptor
instance. - Throws:
NoUniqueComponentException
- if more than one component is registered for the given type.
-
-