|
Lima-Loa | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.limaloa.AdapterFactory
public final class AdapterFactory
Factory class that allows controlled creation of adapter instances.
Method Summary | ||
---|---|---|
|
createAdapter(java.lang.Class<T> sourceInterface,
java.lang.Object target,
java.util.List<MethodMapping> methodMappings)
Creates a new adapter instance, which maps calls to it's methods to the appropriate method on the target object. |
|
static AdapterFactory |
getInstance()
Initialise everything and get a new factory instance. |
|
static AdapterFactory |
getInstance(java.util.List<java.lang.String> mappingFiles,
boolean useDozer)
Initialise everything and get a new factory instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AdapterFactory getInstance()
public static AdapterFactory getInstance(java.util.List<java.lang.String> mappingFiles, boolean useDozer)
List
of filenames, containing
custom Dozer mapping definitions.
mappingFiles
- A List of Dozer mapping filenames to use, or null
if noneuseDozer
- Whether to use Dozer or not
public <T> T createAdapter(java.lang.Class<T> sourceInterface, java.lang.Object target, java.util.List<MethodMapping> methodMappings) throws MappingCreationConfigurationException
T
- The adapter interface typesourceInterface
- The interface type class that the adapter will implementtarget
- The target object to map calls tomethodMappings
- A List of MethodMapping.
Proxy
instance that maps calls.
MappingCreationConfigurationException
- Error creating the adapter
|
Lima-Loa | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |