private GrammarInfo generateSchemaCodeAndInfo(Application app, Set<String> typeClassNames,
File srcDir) {
List<SchemaInfo> schemaElements = getSchemaElements(app);
if (schemaElements != null && !schemaElements.isEmpty()) {
// generate classes from schema
JCodeModel codeModel = createCodeModel(schemaElements, typeClassNames);
if (codeModel != null) {
generateClassesFromSchema(codeModel, srcDir);
}
}
return getGrammarInfo(app.getAppElement(), schemaElements);