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

Access to method parameter names when processing annotations at runtime

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 5.0
    • specification
    • Verified

      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.

            abuckley Alex Buckley
            bshannon Bill Shannon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: