Duplicate :
|
|
Relates :
|
|
Relates :
|
javax.tools.FileObject should provide support for a user-friendly name, via a getName() method. It currently provides support for a URI, which might be an obscure internal name, toString(), which is for debugging, and inferBinaryName which gives a Java-centric name for JavaFileObjects. None of these are guaranteed to be user friendly. For JavaFileObjects created by DefaultFileManager, getName() would reasonably return the path as specified by the user. For command line source files, this would be obvious. For files found on a path, this would obviously seem to be the path name component as given by the user, followed by subdirectories and a filename as appropriate. (ie not an absolute name, or a canonical name, or any other sanitized version.)
|