net.sf.mmm.util.pojo.base
Class DefaultPojoFactory
java.lang.Object
net.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.util.pojo.base.SimplePojoFactory
net.sf.mmm.util.pojo.base.DefaultPojoFactory
- All Implemented Interfaces:
- PojoFactory
- Direct Known Subclasses:
- GuessingPojoFactory
@Singleton
public class DefaultPojoFactory
- extends SimplePojoFactory
This is the default implementation of the
PojoFactory interface.
It extends SimplePojoFactory with the ability to create Maps
and Collections from their interfaces.
- Since:
- 1.1.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
collectionFactoryManager
private CollectionFactoryManager collectionFactoryManager
- See Also:
getCollectionFactoryManager()
DefaultPojoFactory
public DefaultPojoFactory()
- The constructor.
DefaultPojoFactory
public DefaultPojoFactory(CollectionFactoryManager collectionFactoryManager)
- The constructor.
- Parameters:
collectionFactoryManager - is the CollectionFactoryManager
instance used to create Maps and Collections.
getCollectionFactoryManager
protected CollectionFactoryManager getCollectionFactoryManager()
- This method gets the
CollectionFactoryManager instance used to
create Maps and Collections.
- Returns:
- the
CollectionFactoryManager instance.
setCollectionFactoryManager
@Inject
public void setCollectionFactoryManager(CollectionFactoryManager collectionFactoryManager)
- Parameters:
collectionFactoryManager - is the CollectionFactoryManager
instance used to create Maps and Collections.
doInitialize
protected void doInitialize()
- This method performs the actual
initialization. It is
called when AbstractComponent.initialize() is invoked for the first time.
ATTENTION:
When you override this method from a sub-class you need to do a
super.AbstractComponent.doInitialize().
- Overrides:
doInitialize in class AbstractLoggableComponent
newInstanceForInterface
protected <POJO> POJO newInstanceForInterface(Class<POJO> pojoInterface)
throws InstantiationFailedException
- This method is invoked from
SimplePojoFactory.newInstance(Class) if the given
Class is an interface.
- Overrides:
newInstanceForInterface in class SimplePojoFactory
- Type Parameters:
POJO - is the generic type of the
Pojo to create.- Parameters:
pojoInterface - is the interface reflecting the
Pojo to create.
- Returns:
- the new instance of the given
pojoType.
- Throws:
InstantiationFailedException - if the instantiation failed.
Copyright © 2001-2010 mmm-Team. All Rights Reserved.