146 public int getModifiers() { |
146 public int getModifiers() { |
147 return modifiers; |
147 return modifiers; |
148 } |
148 } |
149 |
149 |
150 /** |
150 /** |
151 * Returns the name of the parameter. The names of the parameters |
151 * Returns the name of the parameter. If the parameter's name is |
152 * of a single executable must all the be distinct. When names |
152 * defined in a class file, then that name will be returned by |
153 * from the originating source are available, they are returned. |
153 * this method. Otherwise, this method will synthesize a name of |
154 * Otherwise, an implementation of this method is free to create a |
154 * the form argN, where N is the index of the parameter. |
155 * name of this parameter, subject to the unquiness requirments. |
|
156 */ |
155 */ |
157 public String getName() { |
156 public String getName() { |
158 // As per the spec, if a parameter has no name, return argX, |
157 // Note: empty strings as paramete names are now outlawed. |
159 // where x is the index. |
158 // The .equals("") is for compatibility with current JVM |
160 // |
159 // behavior. It may be removed at some point. |
161 // Note: spec updates now outlaw empty strings as parameter |
|
162 // names. The .equals("") is for compatibility with current |
|
163 // JVM behavior. It may be removed at some point. |
|
164 if(name == null || name.equals("")) |
160 if(name == null || name.equals("")) |
165 return "arg" + index; |
161 return "arg" + index; |
166 else |
162 else |
167 return name; |
163 return name; |
168 } |
164 } |