checkAndAdd(def,allDefs);
setSubpackage(def);
if (def instanceof Module){
Module mod = (Module) def;
ModuleDMO dmo = mod.getDMO();
modules.put(def.getCamelCaseName(), mod);
if (codeGenModule == null)
codeGenModule = mod;
currentModule = mod;
// Read any schemas the module depends on
if (mod.getDependsOnSchemaHasValue()){
Iterator<String> it = dmo.getDependsOnSchema();
while(it.hasNext()){
String ref = it.next();
schemaParser.parseSchema(readSchemas, ref, false);
}