Wednesday, June 26, 2019

JavaFileManager inferBinaryName isn't used for much

The inferBinaryName method of the JavaFileManager for an in-memory compilation task is called for each file needed for compilation. If custom JavaFileObjects are being used, inferBinaryName needs to be able to handle them. However, it appears that the resulting name isn't used for very much. The part after the last dot is interpreted as the class name and checked for validity as a Java identifier. If it's not valid, the class - at least in the Java version I was working with - is not "included". But after that check, the name doesn't seem to be used for anything.

No comments:

Post a Comment