Future proofing use of ct.sym from Scala compiler

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Mar 5 20:11:39 UTC 2018



On 03/04/2018 04:49 PM, Jason Zaugg wrote:
>
> Beyond that issue, the JavaFileManager API doesn't let one find the 
> direct sub-packages of a given package without performing a 
> full recursive walk of the contained class/source files, which is 
> problematic for our use case.
>
> Thanks,
>
> Jason Zaugg

Yes, that is one of many known limitations of the JavaFileManager API.  
The javax.tools API predates the java.nio.file API, and would probably 
have looked very different had that been available when the javax.tools 
API was created.

At least for StandardJavaFileManager, the trend has been to increase 
interoperability with the java.nio.file API, by making it possible to 
get java.nio.file.Path objects for Locations and FileObjects, thus 
allowing the use of java.nio.file API for all the otherwise "missing" 
API on (Standard)JavaFileManager.

-- Jon


More information about the compiler-dev mailing list