// create set for ignores
m_ignoreNames.clear();
m_ignoreNames.addAll(ignores);
// create binding with optional namespace
BindingElement binding = new BindingElement();
binding.setStyleName("attribute");
if (m_namespaceUri != null) {
NamespaceElement namespace = new NamespaceElement();
namespace.setComment(" namespace for all elements of binding ");
namespace.setDefaultName("elements");
namespace.setUri(m_namespaceUri);
binding.addTopChild(namespace);
}
// add mapping for each specified class
m_structureStack.clear();
m_structureNames.clear();
m_beanNames = beans;
m_enumerationNames = enums;
for (int i = 0; i < names.size(); i++) {
String cname = (String)names.get(i);
if (!abstracts.contains(cname)) {
ClassFile cf = ClassCache.requireClassFile(cname);
MappingElementBase mapping = createMapping(cf, false);
mapping.setComment(" generated mapping for class " + cname);
binding.addTopChild(mapping);
}
}
for (Iterator iter = abstracts.iterator(); iter.hasNext();) {
String cname = (String)iter.next();
ClassFile cf = ClassCache.requireClassFile(cname);
MappingElementBase mapping = createMapping(cf, true);
mapping.setComment(" generate abstract mapping for class " + cname);
binding.addTopChild(mapping);
}
// finish with custom mapping definitions
for (Iterator iter = customs.keySet().iterator(); iter.hasNext();) {
String cname = (String)iter.next();
String mname = (String)customs.get(cname);
MappingElementBase mapping = new MappingElement();
mapping.setComment(" specified mapping for class " + cname);
mapping.setClassName(cname);
mapping.setName((String)m_mappedNames.get(cname));
mapping.setMarshallerName(mname);
mapping.setUnmarshallerName(mname);
binding.addTopChild(mapping);
}
// list classes handled if verbose
if (m_verbose) {
for (int i = 0; i < names.size(); i++) {