use of org.eclipse.persistence.jaxb.javamodel.JavaClassCompareByNamespace in project eclipselink by eclipse-ee4j.
the class SchemaGenerator method generateSchema.
public void generateSchema(List<JavaClass> typeInfoClasses, Map<String, TypeInfo> typeInfo, Map<String, QName> userDefinedSchemaTypes, Map<String, PackageInfo> packageToPackageInfoMappings, Map<QName, ElementDeclaration> additionalGlobalElements, Map<String, Class<?>> arrayClassesToGeneratedClasses) {
this.typeInfo = typeInfo;
this.userDefinedSchemaTypes = userDefinedSchemaTypes;
this.packageToPackageInfoMappings = packageToPackageInfoMappings;
this.schemaCount = 1;
this.schemaTypeInfo = new HashMap<>(typeInfo.size());
this.arrayClassesToGeneratedClasses = arrayClassesToGeneratedClasses;
// sort input classes before schema name (like schema1.xsd, schema2.xsd....) is generated and assigned
typeInfoClasses.sort(new JavaClassCompareByNamespace(typeInfo));
for (JavaClass javaClass : typeInfoClasses) {
addSchemaComponents(javaClass);
}
populateSchemaTypes();
if (additionalGlobalElements != null) {
addGlobalElements(additionalGlobalElements);
}
}
Aggregations