Set moduleToGen = adt.getImportsClosureForModule(type.getModuleName()); Iterator moduleIt = moduleToGen.iterator();
Iterator moduleIt; if (hasGlobalName) { moduleIt = adt.getModuleNameSet().iterator(); } else { Set moduleToGen = adt.getImportsClosureForModule(type.getModuleName()); moduleIt = moduleToGen.iterator(); }
    private void genAltVisitableInterface(Type type, Alternative alt) {   		Set moduleToGen = adt.getImportsClosureForModule(type.getModuleName());       	Iterator moduleIt = moduleToGen.iterator();       	while(moduleIt.hasNext()) {       	    String moduleName = (String) moduleIt.next();       	    String visitorPackage = VisitorGenerator.qualifiedClassName(getJavaGenerationParameters(),moduleName);       	    String altClassName = FactoryGenerator.concatTypeAlt(type, alt);      	    //String abstractTypePackage = AbstractTypeGenerator.qualifiedClassName(getJavaGenerationParameters(),moduleName);       	    String abstractTypePackage = AbstractTypeGenerator.qualifiedClassName(getJavaGenerationParameters(),type.getModuleName());       	 	       	    println(       	            "  public " + abstractTypePackage + " accept("       	            + visitorPackage       	            + " v) throws " + traveler + ".VisitFailure {");       	    println("    return v.visit_" + altClassName + "(this);");       	    println("  }");       	    println();       	}    }