Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6614976

make methods in com.sun.tools.javac.parser.Parser protected

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Rejected
    • P4
    • None
    • 7
    • tools
    • x86
    • windows_xp

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ryeung Roger Yeung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: