All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.intarsys.tools.jaxb.PropertiesAdapter Maven / Gradle / Ivy

There is a newer version: 4.11
Show newest version
package de.intarsys.tools.jaxb;

import java.util.HashMap;
import java.util.Map;

import javax.xml.bind.annotation.adapters.XmlAdapter;

public class PropertiesAdapter extends
		XmlAdapter> {

	@Override
	public Properties marshal(Map map) throws Exception {
		Properties properties = new Properties();
		return properties;
	}

	@Override
	public Map unmarshal(Properties properties)
			throws Exception {
		Map map = new HashMap();
		for (Property property : properties.getProperties()) {
			map.put(property.getName(), property.getValue());
		}
		return map;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy