if (generateDocLitBare) {
schemaGen = new DocLitBareSchemaGenerator(loader, className,
schematargetNamespace, schematargetNamespacePrefix,
null);
} else {
schemaGen = new DefaultSchemaGenerator(loader, className,
schematargetNamespace, schematargetNamespacePrefix,
null);
}
} else {
try {
Class<?> clazz = Class.forName(this.schemaGenClassName);
Constructor<?> constructor = clazz.getConstructor(new Class[] {
ClassLoader.class, String.class, String.class,
String.class });
schemaGen = (SchemaGenerator) constructor
.newInstance(new Object[] { loader, className,
schematargetNamespace,
schematargetNamespacePrefix });
} catch (Exception e) {
if (generateDocLitBare) {
schemaGen = new DocLitBareSchemaGenerator(loader,
className, schematargetNamespace,
schematargetNamespacePrefix, null);
} else {
schemaGen = new DefaultSchemaGenerator(loader, className,
schematargetNamespace, schematargetNamespacePrefix,
null);
}
}