240 |
(getIndex.getDeclaringClass())) |
(getIndex.getDeclaringClass())) |
241 |
{ |
{ |
242 |
throw new IntrospectionException("get and set index methods are " |
throw new IntrospectionException("get and set index methods are " |
243 |
"not in the same class."); |
+ "not in the same class."); |
244 |
} |
} |
245 |
} |
} |
246 |
|
|
258 |
.getClass().equals(getMethod.getReturnType())) |
.getClass().equals(getMethod.getReturnType())) |
259 |
{ |
{ |
260 |
throw new IntrospectionException("array methods do not match index " |
throw new IntrospectionException("array methods do not match index " |
261 |
"methods."); |
+ "methods."); |
262 |
} |
} |
263 |
|
|
264 |
this.getMethod = getMethod; |
this.getMethod = getMethod; |
282 |
return getIndex; |
return getIndex; |
283 |
} |
} |
284 |
|
|
285 |
|
/** |
286 |
|
* Sets the method that is used to read an indexed property. |
287 |
|
* |
288 |
|
* @param m the method to set |
289 |
|
*/ |
290 |
|
public void setIndexedReadMethod(Method m) |
291 |
|
{ |
292 |
|
getIndex = m; |
293 |
|
} |
294 |
|
|
295 |
public Method getIndexedWriteMethod() |
public Method getIndexedWriteMethod() |
296 |
{ |
{ |
297 |
return setIndex; |
return setIndex; |
298 |
} |
} |
299 |
|
|
300 |
|
/** |
301 |
|
* Sets the method that is used to write an indexed property. |
302 |
|
* |
303 |
|
* @param m the method to set |
304 |
|
*/ |
305 |
|
public void setIndexedWriteMethod(Method m) |
306 |
|
{ |
307 |
|
setIndex = m; |
308 |
|
} |
309 |
|
|
310 |
private void findMethods(Class beanClass, String getMethodName, |
private void findMethods(Class beanClass, String getMethodName, |
311 |
String setMethodName, String getIndexName, |
String setMethodName, String getIndexName, |
312 |
String setIndexName) |
String setIndexName) |