Class DefaultComponentDescriptorFactory
- java.lang.Object
-
- io.streamthoughts.azkarra.runtime.components.DefaultComponentDescriptorFactory
-
- All Implemented Interfaces:
ComponentDescriptorFactory
public class DefaultComponentDescriptorFactory extends Object implements ComponentDescriptorFactory
-
-
Constructor Summary
Constructors Constructor Description DefaultComponentDescriptorFactory()
Creates a newDefaultComponentDescriptorFactory
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> ComponentDescriptor<T>
make(String componentName, Class<T> componentType, Supplier<T> componentSupplier, boolean isSingleton)
Makes a newSimpleComponentDescriptor
instance.void
setComponentNameGenerator(ComponentNameGenerator componentNameGenerator)
Sets theComponentNameGenerator
used for generate a component name if no one is provided.
-
-
-
Constructor Detail
-
DefaultComponentDescriptorFactory
public DefaultComponentDescriptorFactory()
Creates a newDefaultComponentDescriptorFactory
instance.
-
-
Method Detail
-
setComponentNameGenerator
public void setComponentNameGenerator(ComponentNameGenerator componentNameGenerator)
Sets theComponentNameGenerator
used for generate a component name if no one is provided.- Parameters:
componentNameGenerator
- theComponentNameGenerator
.
-
make
public <T> ComponentDescriptor<T> make(String componentName, Class<T> componentType, Supplier<T> componentSupplier, boolean isSingleton)
Makes a newSimpleComponentDescriptor
instance.- Specified by:
make
in interfaceComponentDescriptorFactory
- Parameters:
componentName
- the name of the component (can benull
.componentType
- the type of the component.componentSupplier
- the supplier of the component.isSingleton
- is the component singleton.- Returns:
- a new instance of
ComponentDescriptor
.
-
-