public class GuessingPojoFactory extends DefaultPojoFactory
PojoFactory interface. DefaultPojoFactory it tries to find implementations for interfaces by guessing according to
conventions: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")| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
GuessingPojoFactory()
The constructor.
|
GuessingPojoFactory(CollectionFactoryManager collectionFactoryManager)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected <POJO> POJO |
newInstanceForInterface(Class<POJO> pojoInterface)
This method is invoked from
SimplePojoFactory.newInstance(Class) if the given Class is an interface. |
doInitialize, getCollectionFactoryManager, setCollectionFactoryManagernewInstance, newInstanceForClasscreateLogger, getLoggerdoInitialized, getInitializationState, initializeprivate static final String IMPL_CLASS_SUFFIX
private static final String IMPL_PKG_SUFFIX
private static final String API_PKG_SUFFIX
public GuessingPojoFactory()
public GuessingPojoFactory(CollectionFactoryManager collectionFactoryManager)
collectionFactoryManager - is the CollectionFactoryManager instance used to create
Maps and Collections.protected <POJO> POJO newInstanceForInterface(Class<POJO> pojoInterface) throws InstantiationFailedException
DefaultPojoFactorySimplePojoFactory.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.Copyright © 2001–2016 mmm-Team. All rights reserved.