use of com.sun.xml.ws.spi.db.PropertySetter in project metro-jax-ws by eclipse-ee4j.
the class SDOWrapperAccessor method initBuilders.
protected void initBuilders() {
HashMap<Object, PropertySetter> setByQName = new HashMap<>();
HashMap<Object, PropertyGetter> getByQName = new HashMap<>();
HashMap<Object, PropertySetter> setByLocalpart = new HashMap<>();
HashMap<Object, PropertyGetter> getByLocalpart = new HashMap<>();
HashSet<String> elementLocalNames = new HashSet<>();
TypeHelper helper = contextWrapper.getHelperContext().getTypeHelper();
Type type = helper.getType(contentClass);
@SuppressWarnings("unchecked") List<Property> properties = (List<Property>) type.getDeclaredProperties();
for (Property p : properties) {
QName qname = SDOUtils.getPropertyElementName(contextWrapper.getHelperContext(), p);
SDOPropertyBuilder pBuilder = new SDOPropertyBuilder(qname, p.getType().getInstanceClass());
setByQName.put(qname, pBuilder);
getByQName.put(qname, pBuilder);
setByLocalpart.put(qname.getLocalPart(), pBuilder);
getByLocalpart.put(qname.getLocalPart(), pBuilder);
if (elementLocalNames.contains(qname.getLocalPart())) {
elementLocalNameCollision = true;
} else {
elementLocalNames.add(qname.getLocalPart());
}
}
if (elementLocalNameCollision) {
propertySetters = setByQName;
propertyGetters = getByQName;
} else {
propertySetters = setByLocalpart;
propertyGetters = getByLocalpart;
}
}
Aggregations