I've been using a CompilationUnit
to parse Java files but now I'd like to parse all files within a directory.
I've tried the following however the compilation size is calculated as 0 when I expect it to be the number of Java files within the specified directory.
Path pathToSource = Paths.get("resources/src");
SourceRoot sourceRoot = new SourceRoot(pathToSource);
List<CompilationUnit> compilations = sourceRoot.getCompilationUnits();
Following the JavaDoc - https://www.javadoc.io/doc/com.github.javaparser/javaparser-core