JDK-8170251 : Add javax.tools.Tool.name()
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-11-23
  • Updated: 2017-05-17
  • Resolved: 2016-12-10
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 9
9 b149Fixed
Related Reports
Relates :  
Description
Although javax.tools.Tool and javax.tools.ToolProvider have been somewhat superceded by the new java.util.spi.ToolProvider, they still have a use with respect to use with ServiceLoader, but there has always been a problem with using javax.tools.Tool with ServiceLoader because there has not been a well-defined way to identify the tools that may be returned.

Although by no means perfect, it would be good to follow the example set by java.util.spi.ToolProvider and provide a default method for the javax.tools.Tool interface, 

    default String name() { return ""; }
Comments
The method should be implemented by the existing subtypes of Tool, for javac and javadoc. Also, javac and javadoc should declare they provide the javax.tools.Tool service.
10-12-2016