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

Access to method parameter names when processing annotations at runtime

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 8
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • Verification:
      Verified

      Description

      With some of the uses of annotations in Java EE we would like to be able
      to discover the names of parameters for methods. Of course we can get
      this information if we compile with appropriate debugging flags, but we
      don't want to be limited to that. And there are hacks with annotation
      processors to discover this information and save it for runtime (when we
      need it). But we'd really like a simple way to get this via reflection.
      Best would be to just get it all the time, but I understand that will
      unnecessarily increase the size of class files in most cases.

      An alternative would be to have a way to tell the compiler to save this
      information in certain cases. An annotation on a class or method could
      do this, but better would be a meta-annotation on another annotation so
      that when that other annotation (e.g., @WebService) is used, parameter
      name information will be saved.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                abuckley Alex Buckley
                Reporter:
                bshannon Bill Shannon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: