if (Boolean.TRUE.equals(xmlAccessorFactorySupport) || Boolean.TRUE.equals(xmlAccessorFactorySupportRI)) {
enableXmlAccessorFactory = true;
}
}
JavaModelImpl jModel;
if (annotationHelper != null) {
jModel = new JavaModelImpl(loader, annotationHelper);
} else {
jModel = new JavaModelImpl(loader);
}
// create Map of package names to metadata complete indicators
Map<String, Boolean> metadataComplete = new HashMap<String, Boolean>();
for (String packageName : xmlBindings.keySet()) {
if (xmlBindings.get(packageName).isXmlMappingMetadataComplete()) {
metadataComplete.put(packageName, true);
}
}
if (metadataComplete.size() > 0) {
jModel.setMetadataCompletePackageMap(metadataComplete);
}
jModel.setHasXmlBindings(xmlBindings != null || !xmlBindings.isEmpty());
JavaModelInputImpl inputImpl = new JavaModelInputImpl(classesToBeBound, jModel);
if (properties != null) enableFacetsIfPropertySetTrue(inputImpl, properties);
try {
Generator generator = new Generator(inputImpl, xmlBindings, loader, defaultTargetNamespace, enableXmlAccessorFactory);
return createContextState(generator, loader, classesToBeBound, properties);