parse
Parses a .java files under the source root and returns its CompilationUnit. It keeps track of the parsed file so you can write it out with the saveAll() call. Note that the cache grows with every file parsed, so if you don't need saveAll(), or you don't ask SourceRoot to parse files multiple times (where the cache is useful) you might want to use the parse method with a callback.
Parameters
files in this package and deeper are parsed. Pass "" to parse all files.
Throws
when something went wrong.
Locates the .java file with the provided package and file name, parses it and passes it to the callback. In comparison to the other parse methods, this is much more memory efficient, but saveAll() won't work.
Parameters
The package containing the file
The name of the file
Parses the provided .java file and passes it to the callback. In comparison to the other parse methods, this makes is much more memory efficient., but saveAll() won't work.
Tries to parse all .java files in a package recursively and passes them one by one to the callback. In comparison to the other parse methods, this is much more memory efficient, but saveAll() won't work.
Parameters
files in this package and deeper are parsed. Pass "" to parse all files.