JDK-6411310 : JSR 199: FileObject should support user-friendly names via getName()
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-04-10
  • Updated: 2017-05-16
  • Resolved: 2006-05-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b85Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
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.)

Comments
EVALUATION This method is needed by javadoc (see 6416031).
26-04-2006

EVALUATION We should add a getName method to FileObject.
21-04-2006