[jnigen] Refactor into Visitor pattern (https://github.com/dart-lang/jnigen/issues/200)
Introducing a top-level `Classes` class which includes all the classes we're trying to generate as yet another element, makes each step of the code generation pipeline, feel the same. For example exclusion of classes and methods are now both done via actually removing the objects instead of setting an `isIncluded` flag.
This `Classes` object will go through a pipeline of:
1. `Excluder` – excludes the unwanted classes, the private ones and the ones specified by the user.
2. `Linker` – links up the objects together to create a graph.
3. `Renamer` – renames the classes, methods, fields, ... not to clash with other reserved names.
4. `DartGenerator` – generates and writes to files.
47 files changed