|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.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
net.sf.mmm.util.pojo.base.GuessingPojoFactory
@Singleton @Named public class GuessingPojoFactory
This is the default implementation of the
PojoFactory interface.
In advance to DefaultPojoFactory it tries to find implementations for
interfaces by guessing according to conventions:
For an interface some.package.api.Foo it will try to find the
following classes...
some.package.api.FooImplsome.package.api.impl.FooImplsome.package.impl.FooImpl (only if package of interface ends
with ".api")
| Field Summary | |
|---|---|
private static String |
API_PKG_SUFFIX
The conventional suffix for an api package. |
private static String |
IMPL_CLASS_SUFFIX
The conventional suffix for an implementation class. |
private static String |
IMPL_PKG_SUFFIX
The conventional suffix for an implementation package. |
| Constructor Summary | |
|---|---|
GuessingPojoFactory()
The constructor. |
|
GuessingPojoFactory(CollectionFactoryManager collectionFactoryManager)
The constructor. |
|
| Method Summary | ||
|---|---|---|
protected
|
newInstanceForInterface(Class<POJO> pojoInterface)
This method is invoked from SimplePojoFactory.newInstance(Class) if the given
Class is an interface. |
|
| Methods inherited from class net.sf.mmm.util.pojo.base.DefaultPojoFactory |
|---|
doInitialize, getCollectionFactoryManager, setCollectionFactoryManager |
| Methods inherited from class net.sf.mmm.util.pojo.base.SimplePojoFactory |
|---|
newInstance, newInstanceForClass |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent |
|---|
getLogger, setLogger |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent |
|---|
doInitialized, getInitializationState, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final String IMPL_CLASS_SUFFIX
private static final String IMPL_PKG_SUFFIX
private static final String API_PKG_SUFFIX
| Constructor Detail |
|---|
public GuessingPojoFactory()
public GuessingPojoFactory(CollectionFactoryManager collectionFactoryManager)
collectionFactoryManager - is the CollectionFactoryManager
instance used to create Maps and
Collections.| Method Detail |
|---|
protected <POJO> POJO newInstanceForInterface(Class<POJO> pojoInterface)
throws InstantiationFailedException
SimplePojoFactory.newInstance(Class) if the given
Class is an interface.
newInstanceForInterface in class DefaultPojoFactoryPOJO - is the generic type of the
Pojo to create.pojoInterface - is the interface reflecting the
Pojo to create.
pojoType.
InstantiationFailedException - if the instantiation failed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||