Details
-
Enhancement
-
Resolution: Fixed
-
P3
-
8
-
b100
-
Verified
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.
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.