public class ALDDataConverterManager extends Object
For data input, it essentially looks up the correct provider for GUI-based execution using the method of its super class and invokes its method.
It does its work in collaboration with
ALDDataConverter.
| Modifier and Type | Class and Description |
|---|---|
static class |
ALDDataConverterManager.ALDSourceTargetClassPair
A pair of source and target pair (of a converter)
|
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<String,Collection<String>> |
mapTable
Hashtable containing mappings of class pairs to a collection of provider class names.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
convert(ALDDataConverter provider,
Object sourceObject,
Field sourceField,
Class<?> targetClass,
Field targetField)
Convert the
sourceObject into an object of class
targetClass. |
Object |
convert(Object sourceObject,
Class<?> targetClass)
Convert the
sourceObject into an object of class
targetClass. |
Object |
convert(Object sourceObject,
Field sourceField,
Class<?> targetClass,
Field targetField) |
Object |
convert(Object sourceObject,
Type[] sourceTypes,
Class<?> targetClass,
Type[] targetTypes)
Convert the
sourceObject into an object of class
targetClass. |
static ALDDataConverterManager |
getInstance()
Return the single instance of this class
|
ALDDataConverter |
getProvider(Class<?> sourceClass,
Field sourceField,
Class<?> targetClass,
Field targetField) |
ALDDataConverter |
getProvider(Class<?> sourceClass,
Type[] sourceTypes,
Class<?> targetClass,
Type[] targetTypes)
Method to return an instance of the data converter provider for given classes.
|
protected static HashMap<String,Collection<String>> |
initMapTable()
Method to initialize the hashmap which registers data conversion providers.
|
static void |
printMap(HashMap<String,Collection<String>> mapTable) |
protected HashMap<String,Collection<String>> mapTable
public static ALDDataConverterManager getInstance()
public Object convert(Object sourceObject, Type[] sourceTypes, Class<?> targetClass, Type[] targetTypes) throws ALDDataConverterException, ALDDataConverterManagerException
sourceObject into an object of class
targetClass.sourceObject - sourceTypes - targetClass - targetTypes - ALDDataConverterExceptionALDDataConverterManagerExceptionpublic Object convert(ALDDataConverter provider, Object sourceObject, Field sourceField, Class<?> targetClass, Field targetField) throws ALDDataConverterManagerException, ALDDataConverterException
sourceObject into an object of class
targetClass.sourceObject - sourceTypes - targetClass - targetTypes - ALDDataConverterManagerExceptionALDDataConverterExceptionpublic Object convert(Object sourceObject, Field sourceField, Class<?> targetClass, Field targetField) throws ALDDataConverterManagerException, ALDDataConverterException
public Object convert(Object sourceObject, Class<?> targetClass) throws ALDDataConverterManagerException, ALDDataConverterException
sourceObject into an object of class
targetClass.sourceObject - targetClass - ALDDataConverterManagerExceptionALDDataConverterExceptionpublic ALDDataConverter getProvider(Class<?> sourceClass, Type[] sourceTypes, Class<?> targetClass, Type[] targetTypes) throws ALDDataConverterManagerException
sourceClass - targetClass - ALDDataConverterManagerExceptionALDDataIOManagerExceptionpublic ALDDataConverter getProvider(Class<?> sourceClass, Field sourceField, Class<?> targetClass, Field targetField) throws ALDDataConverterManagerException
ALDDataConverterManagerExceptionprotected static HashMap<String,Collection<String>> initMapTable()
ALDDataConverterManagerExceptionpublic static void printMap(HashMap<String,Collection<String>> mapTable)
Copyright © 2010–2015 Martin Luther University Halle-Wittenberg. All rights reserved.