AbsoluteLocation baseDirLoc = Entities.getAbsoluteLocation(baseDir);
ArrayList<JavaFileObject> res = new ArrayList<JavaFileObject>();
Lock rl = d.lockForReading();
try
{
Iterator<EntityView> itr = new FilteringIterator<EntityView>((recurse ? Directories.getDepthLastIterator(d) : Directories.getIterator(d)), new EFileNameExtensionFilter("class"));
while (itr.hasNext())
{
EFile f = (EFile) itr.next();
res.add(new EFileJavaFileObjectAdapter(f, Kind.CLASS, baseDirLoc, Directories.getChildRelativeLocation(d, f)));
}