de.intarsys.tools.jaxb.PropertiesAdapter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of isrt Show documentation
Show all versions of isrt Show documentation
The basic runtime tools and interfaces for intarsys components.
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