}
public void writePackages(GroovyRootDoc rootDoc, String destdir) throws Exception {
Iterator packageDocs = Arrays.asList(rootDoc.specifiedPackages()).iterator();
while (packageDocs.hasNext()) {
GroovyPackageDoc packageDoc = (GroovyPackageDoc) packageDocs.next();
output.makeOutputArea(destdir + FS + packageDoc.name());
writePackageToOutput(packageDoc, destdir);
}
}