Class ComponentFactory.SimpleFactory<T>
- java.lang.Object
-
- io.streamthoughts.azkarra.api.components.ComponentFactory.SimpleFactory<T>
-
- All Implemented Interfaces:
ComponentFactory<T>
- Enclosing interface:
- ComponentFactory<T>
public static final class ComponentFactory.SimpleFactory<T> extends Object implements ComponentFactory<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.streamthoughts.azkarra.api.components.ComponentFactory
ComponentFactory.SimpleFactory<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<T>
getType()
Returns the type of the component created by thisComponentFactory
.boolean
isSingleton()
Returns the if the instance created from thisComponentFactory
must be shared across the application.T
make()
Creates a new instance for the specified type.
-
-
-
Method Detail
-
make
public T make()
Creates a new instance for the specified type.- Specified by:
make
in interfaceComponentFactory<T>
- Returns:
- the new instance of type
ComponentFactory
.
-
getType
public Class<T> getType()
Returns the type of the component created by thisComponentFactory
.- Specified by:
getType
in interfaceComponentFactory<T>
- Returns:
- a
Class
instance.
-
isSingleton
public boolean isSingleton()
Returns the if the instance created from thisComponentFactory
must be shared across the application.- Specified by:
isSingleton
in interfaceComponentFactory<T>
- Returns:
true
if the instance is shared,false
otherwise.
-
-