-
Enhancement
-
Resolution: Rejected
-
P4
-
None
-
7
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
In doing research and experimenting with OpenJDK and the javac tools, it would be highly useful to be able to create derived classes from com.sun.tools.javac.parser.Parser. Indeed one can, but most of the methods have package visibility rather than protected, so one cannot override the methods to add additional functionality. Hence this request: change the visibility of the parsing methods to protected
JUSTIFICATION :
As a big aid in reusability and resarch with the parser, without duplicating code.
CUSTOMER SUBMITTED WORKAROUND :
There is no workaround. A replacement parser needs to be derived from com.sun.tools.javac.parser.Parser, but then the methods cannot be overridden. Replicating the code in the derived class does not work and a completely separate parser does not ahve the right inheritance hierarchy.
In doing research and experimenting with OpenJDK and the javac tools, it would be highly useful to be able to create derived classes from com.sun.tools.javac.parser.Parser. Indeed one can, but most of the methods have package visibility rather than protected, so one cannot override the methods to add additional functionality. Hence this request: change the visibility of the parsing methods to protected
JUSTIFICATION :
As a big aid in reusability and resarch with the parser, without duplicating code.
CUSTOMER SUBMITTED WORKAROUND :
There is no workaround. A replacement parser needs to be derived from com.sun.tools.javac.parser.Parser, but then the methods cannot be overridden. Replicating the code in the derived class does not work and a completely separate parser does not ahve the right inheritance hierarchy.
- relates to
-
JDK-6614975 change some private members to protected in com.sun.tools.javac.parser.Scanner
-
- Closed
-