public class ReflectiveAdapter<T> extends Object implements ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>
| Constructor and Description |
|---|
ReflectiveAdapter(Class<T> clazz) |
ReflectiveAdapter(Class<T> clazz,
T providedConfObj) |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(Map<String,Object> serialized,
ReflectiveConfig config,
Field field)
Constructs an object from its serialized form
|
boolean |
isWritingChildren(Field field)
Should indicate whether the specified field will generate a child when writing configuration
|
void |
merge(T prev,
T curr,
ReflectiveConfig config,
ReflectiveConfig.ConfigWriter diffwriter,
Field field) |
Map<String,Object> |
read(ReflectiveConfig config,
ReflectiveConfig.ConfigReader reader,
Field field)
Reads an attribute from configuration into its serialized form
|
Map<String,Object> |
serialize(T obj,
ReflectiveConfig config,
Field field)
Constructs a serialized representation of an object
|
void |
write(Map<String,Object> serialized,
ReflectiveConfig config,
ReflectiveConfig.ConfigWriter writer,
Field field)
Writes the serialized representation to the configuration backend.
|
public boolean isWritingChildren(Field field)
ReflectiveConfig.ConfigTypeAdapterisWritingChildren in interface ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>public void write(Map<String,Object> serialized, ReflectiveConfig config, ReflectiveConfig.ConfigWriter writer, Field field) throws ConfigurationException
ReflectiveConfig.ConfigTypeAdapterwrite in interface ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>config - ReflectiveConfig that can be used e.g. to retrieve
DicomConfiguration Can be null!writer - ConfigWriter to usefield - Config field. Can be used to read additional annotations,
check type, etc.ConfigurationExceptionpublic Map<String,Object> serialize(T obj, ReflectiveConfig config, Field field) throws ConfigurationException
ReflectiveConfig.ConfigTypeAdapterserialize in interface ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>config - ReflectiveConfig that can be used e.g. to retrieve
DicomConfiguration Can be null!field - Config field. Can be used to read additional annotations,
check type, etc.ConfigurationExceptionpublic Map<String,Object> read(ReflectiveConfig config, ReflectiveConfig.ConfigReader reader, Field field) throws ConfigurationException
ReflectiveConfig.ConfigTypeAdapterread in interface ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>config - ReflectiveConfig that can be used e.g. to retrieve
DicomConfiguration Can be null!reader - ConfigReader to usefield - Config field. Can be used to read additional annotations,
check type, etc.ConfigurationExceptionpublic T deserialize(Map<String,Object> serialized, ReflectiveConfig config, Field field) throws ConfigurationException
ReflectiveConfig.ConfigTypeAdapterdeserialize in interface ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>config - ReflectiveConfig that can be used e.g. to retrieve
DicomConfiguration Can be null!field - Config field. Can be used to read additional annotations,
check type, etc.ConfigurationExceptionpublic void merge(T prev, T curr, ReflectiveConfig config, ReflectiveConfig.ConfigWriter diffwriter, Field field) throws ConfigurationException
merge in interface ReflectiveConfig.ConfigTypeAdapter<T,Map<String,Object>>ConfigurationExceptionCopyright © 2014 dcm4che.org. All rights reserved.