Interface ConditionalDescriptorRegistry
-
- All Known Subinterfaces:
ComponentFactory
- All Known Implementing Classes:
ContextAwareComponentFactory,DelegatingComponentFactory
public interface ConditionalDescriptorRegistryThe main interface that defines methods to find registeredComponentDescriptorfor enable components.- See Also:
Condition
-
-
Method Summary
-
-
-
Method Detail
-
findAllDescriptorsByClass
<T> Collection<ComponentDescriptor<T>> findAllDescriptorsByClass(Class<T> type, ComponentConditionalContext context)
Finds allComponentDescriptorregistered 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 allComponentDescriptorregistered 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 allComponentDescriptorregistered 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 allComponentDescriptorregistered 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 aComponentDescriptorfor 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
ComponentDescriptorinstance. - 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 aComponentDescriptorfor 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
ComponentDescriptorinstance. - 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 aComponentDescriptorfor the specified type.- Type Parameters:
T- the component type.- Parameters:
type- the component class.- Returns:
- the optional
ComponentDescriptorinstance. - 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 aComponentDescriptorfor 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
ComponentDescriptorinstance. - Throws:
NoUniqueComponentException- if more than one component is registered for the given type.
-
-