ElementDecl element = (ElementDecl) annotated;
String typexPath = XPathHelper.getSchemaLocation(element.getType());
xPath += "[" + typexPath + "]";
typedLocalName += "[" + typexPath + "]";
} else if (annotated instanceof Group) {
Group group = (Group) annotated;
if (group.getOrder() == Order.choice
&& !_globalElements.contains("/" + localXPath)) {
xPath += "/#choice";
}
}
ExtendedBinding binding = component.getBinding();
if (binding != null) {
// deal with explicit exclusions
if (binding.existsExclusion(typedLocalName)) {
Exclude exclusion = binding.getExclusion(typedLocalName);
if (exclusion.getClassName() != null) {
LOG.info("Dealing with exclusion for local element " + xPath
+ " as per binding file.");
jClass.changeLocalName(exclusion.getClassName());
}
return;
}
// deal with explicit forces
if (binding.existsForce(localName)) {
List<String> localNamesList = _localNames.get(localName);
memorizeCollision(xPath, localName, localNamesList);
LOG.info("Changing class name for local element " + xPath
+ " as per binding file (force).");
checkAndChange(jClass, annotated, untypedXPath, typedLocalName);
return;
}
}
String jClassLocalName = jClass.getLocalName();
String expectedClassNameDerivedFromXPath = _javaNaming.toJavaClassName(localName);
if (!jClassLocalName.equals(expectedClassNameDerivedFromXPath)) {
if (component.createGroupItem()) {
xPath += "/#item";
}
_xpathToJClass.put(xPath, jClass);
return;
}
if (mode.equals("field")) {
if (annotated instanceof ModelGroup) {
ModelGroup group = (ModelGroup) annotated;
final boolean isReference = group.isReference();
if (isReference) {
return;
}
}