private static class Component {
String domain, editor, icon, view;
}
private static void init(String resource) throws Exception {
XStream xstream = new XStream();
xstream.alias("jease", List.class);
xstream.alias("component", Component.class);
Enumeration<URL> urls = Registry.class.getClassLoader().getResources(
resource);
while (urls.hasMoreElements()) {
InputStream url = urls.nextElement().openStream();
for (Component component : (List<Component>) xstream.fromXML(url)) {
registerComponent(component);
}
url.close();
}
initDomainTypes(editors.keySet());