Is there a particular reason this is not just
```
for (entry <- enums if entry.endsWith(".class")) {
   classes += ...
}
```
?