jdk/src/share/classes/java/lang/reflect/Parameter.java
changeset 20506 d826dd5f8e10
parent 19031 6c9afe6dad33
child 21316 ca0a7cd228c9
equal deleted inserted replaced
20505:b94e6ca64006 20506:d826dd5f8e10
   102      *
   102      *
   103      * @return true if and only if the parameter has a name according
   103      * @return true if and only if the parameter has a name according
   104      * to the class file.
   104      * to the class file.
   105      */
   105      */
   106     public boolean isNamePresent() {
   106     public boolean isNamePresent() {
   107         return executable.hasRealParameterData();
   107         return executable.hasRealParameterData() && name != null;
   108     }
   108     }
   109 
   109 
   110     /**
   110     /**
   111      * Returns a string describing this parameter.  The format is the
   111      * Returns a string describing this parameter.  The format is the
   112      * modifiers for the parameter, if any, in canonical order as
   112      * modifiers for the parameter, if any, in canonical order as
   178         // behavior.  It may be removed at some point.
   178         // behavior.  It may be removed at some point.
   179         if(name == null || name.equals(""))
   179         if(name == null || name.equals(""))
   180             return "arg" + index;
   180             return "arg" + index;
   181         else
   181         else
   182             return name;
   182             return name;
       
   183     }
       
   184 
       
   185     // Package-private accessor to the real name field.
       
   186     String getRealName() {
       
   187         return name;
   183     }
   188     }
   184 
   189 
   185     /**
   190     /**
   186      * Returns a {@code Type} object that identifies the parameterized
   191      * Returns a {@code Type} object that identifies the parameterized
   187      * type for the parameter represented by this {@code Parameter}
   192      * type for the parameter represented by this {@code Parameter}