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

Annotation processor should receive sourcepath and classpath as options

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 8u25
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      A DESCRIPTION OF THE REQUEST :
      In the annotation processor VALJOGen (http://valjogen.41concepts.com) I need to read additional configuration files from the sourcepath. Unfortunately, I can not do that with the existing javax.annotation.processing.Filer API so I had to create a custom processor option where users have to set the source path in addition to the source path already specified for javac. It would be much simpler if I could find out what the source path for javac is in a standard way. Either by the path being passed as an option automatically or by extend Filer with read methods that use the sourcepath.

      JUSTIFICATION :
      Much better user experience when using advanced annotation processors - avoiding a mess of duplicated custom options.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Annotation processors able to directly or indirectly read files on the source path. Either by exposing the sourcepath to the annotation processor or by added read methods to the Filer api.
      ACTUAL -
      Right now annotation processors has no idea what the source path is so each processor has to invent their own solution for this. Some use sun.* internals, some pass custom options.

      CUSTOMER SUBMITTED WORKAROUND :
      Right now annotation processors has no idea what the source path is so each processor has to invent their own solution for this. Some use sun.* internals, some pass custom options.

        Attachments

          Activity

            People

            • Assignee:
              darcy Joe Darcy
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: