@Singleton public class DefaultPojoFactory extends SimplePojoFactory
PojoFactory
interface. SimplePojoFactory
with the ability to create Map
s and Collection
s from their
interfaces.Modifier and Type | Field and Description |
---|---|
private CollectionFactoryManager |
collectionFactoryManager |
Constructor and Description |
---|
DefaultPojoFactory()
The constructor.
|
DefaultPojoFactory(CollectionFactoryManager collectionFactoryManager)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doInitialize()
This method performs the actual
initialization . |
protected CollectionFactoryManager |
getCollectionFactoryManager()
|
protected <POJO> POJO |
newInstanceForInterface(Class<POJO> pojoInterface)
This method is invoked from
SimplePojoFactory.newInstance(Class) if the given Class is an interface . |
void |
setCollectionFactoryManager(CollectionFactoryManager collectionFactoryManager) |
newInstance, newInstanceForClass
createLogger, getLogger
doInitialized, getInitializationState, initialize
private CollectionFactoryManager collectionFactoryManager
public DefaultPojoFactory()
public DefaultPojoFactory(CollectionFactoryManager collectionFactoryManager)
collectionFactoryManager
- is the CollectionFactoryManager
instance used to create Map
s and
Collection
s.protected CollectionFactoryManager getCollectionFactoryManager()
CollectionFactoryManager
instance.@Inject public void setCollectionFactoryManager(CollectionFactoryManager collectionFactoryManager)
collectionFactoryManager
- is the CollectionFactoryManager
instance used to create Map
s and
Collection
s.protected void doInitialize()
AbstractComponent
initialization
. It is called when AbstractComponent.initialize()
is
invoked for the first time. super.
AbstractComponent.doInitialize()
.doInitialize
in class AbstractLoggableComponent
protected <POJO> POJO newInstanceForInterface(Class<POJO> pojoInterface) throws InstantiationFailedException
SimplePojoFactory.newInstance(Class)
if the given Class
is an interface
.newInstanceForInterface
in class SimplePojoFactory
POJO
- is the generic type of the Pojo
to create.pojoInterface
- is the interface reflecting the Pojo
to create.pojoType
.InstantiationFailedException
- if the instantiation failed.Copyright © 2001–2016 mmm-Team. All rights reserved.