Getting Started with JavaParser: Analyzing Java Code Programmatically

The JavaParser library provides an abstract syntax tree for Java code. The AST structure allows you to use Java code in a simple programmatic way. When using JavaParser, we usually want to perform a series of operations at a time. Usually, we want to operate on the entire project, so given a directory, we will explore all Java files. This class should help to accomplish the following operations. import; public class DirExplorer { public interface FileHandler { void handle(int level, String path, File file); } public interface Filter { boolean interested(int level, String path, File file); } private FileHandler fileHandler; private Filter filter; public DirExplorer(Filter filter, FileHandler fileHandler) { this.