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

Add java.lang.reflect.Parameter.isNamePresent()

    XMLWordPrintable

Details

    Description

      1. Add Parameter.isNamePresent()

      Returns true if the parameter has a name according to the class file; returns false otherwise. Whether a parameter has a name is determined by the {@literal MethodParameters} attribute of the method which declares the parameter.

      @return true if and only if the parameter has a name according to the class file.

      2. Modify Parameter.getName()

      Returns the name of the parameter. If the parameter's name is {@linkplain isNamePresent() present}, then this method returns the name provided by the class file. Otherwise, this method synthesizes a name of the form argN, where N is the index of the parameter in the descriptor of the method which declares the parameter.

      @return The name of the parameter, either provided by the class file or synthesized if the class file does not provide a name.

      Attachments

        Activity

          People

            emc Eric Mccorkle
            abuckley Alex Buckley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: