Class DefaultProviderClassReader
- java.lang.Object
-
- io.streamthoughts.azkarra.runtime.components.DefaultProviderClassReader
-
- All Implemented Interfaces:
ComponentClassReader
public class DefaultProviderClassReader extends Object implements ComponentClassReader
Simple implementation forComponentClassReader
interface.
-
-
Constructor Summary
Constructors Constructor Description DefaultProviderClassReader()
Creates a newDefaultProviderClassReader
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> void
addDescriptorFactoryForType(Class<T> type, ComponentDescriptorFactory<T> factory)
Add a descriptor factory to this reader.<T> void
registerComponent(ComponentFactory<T> factory, ComponentRegistry registry)
Registers theProvider
class using the specifiedComponentRegistry
.<T> void
registerComponent(Class<T> type, ComponentRegistry registry)
Registers theProvider
class using the specifiedComponentRegistry
.void
registerComponent(String componentClassName, ComponentRegistry registry)
Registers theProvider
class using the specifiedComponentRegistry
.
-
-
-
Constructor Detail
-
DefaultProviderClassReader
public DefaultProviderClassReader()
Creates a newDefaultProviderClassReader
instance.
-
-
Method Detail
-
addDescriptorFactoryForType
public <T> void addDescriptorFactoryForType(Class<T> type, ComponentDescriptorFactory<T> factory)
Add a descriptor factory to this reader.- Specified by:
addDescriptorFactoryForType
in interfaceComponentClassReader
- Parameters:
type
- the typefactory
- theComponentDescriptorFactory
instance.
-
registerComponent
public void registerComponent(String componentClassName, ComponentRegistry registry)
Registers theProvider
class using the specifiedComponentRegistry
.- Specified by:
registerComponent
in interfaceComponentClassReader
- Parameters:
componentClassName
- the component class name to be read and register.registry
- theComponentRegistry
instance to be used.
-
registerComponent
public <T> void registerComponent(Class<T> type, ComponentRegistry registry)
Registers theProvider
class using the specifiedComponentRegistry
.- Specified by:
registerComponent
in interfaceComponentClassReader
- Type Parameters:
T
- the component-type.- Parameters:
type
- the component class to be read and register.registry
- theComponentRegistry
instance to be used.
-
registerComponent
public <T> void registerComponent(ComponentFactory<T> factory, ComponentRegistry registry)
Registers theProvider
class using the specifiedComponentRegistry
.- Specified by:
registerComponent
in interfaceComponentClassReader
- Type Parameters:
T
- the component-type.- Parameters:
factory
- theComponentFactory
instance to be used.registry
- theComponentRegistry
instance to be used.
-
-