64 |
|
|
65 |
public class PropertyDescriptor extends FeatureDescriptor |
public class PropertyDescriptor extends FeatureDescriptor |
66 |
{ |
{ |
67 |
Class propertyType; |
Class<?> propertyType; |
68 |
Method getMethod; |
Method getMethod; |
69 |
Method setMethod; |
Method setMethod; |
70 |
|
|
71 |
Class propertyEditorClass; |
Class<?> propertyEditorClass; |
72 |
boolean bound; |
boolean bound; |
73 |
boolean constrained; |
boolean constrained; |
74 |
|
|
102 |
** @exception IntrospectionException if the methods are not found |
** @exception IntrospectionException if the methods are not found |
103 |
** or invalid. |
** or invalid. |
104 |
**/ |
**/ |
105 |
public PropertyDescriptor(String name, Class beanClass) |
public PropertyDescriptor(String name, Class<?> beanClass) |
106 |
throws IntrospectionException |
throws IntrospectionException |
107 |
{ |
{ |
108 |
setName(name); |
setName(name); |
158 |
**/ |
**/ |
159 |
public PropertyDescriptor( |
public PropertyDescriptor( |
160 |
String name, |
String name, |
161 |
Class beanClass, |
Class<?> beanClass, |
162 |
String getMethodName, |
String getMethodName, |
163 |
String setMethodName) |
String setMethodName) |
164 |
throws IntrospectionException |
throws IntrospectionException |
212 |
** This is the type the get method returns and the set method |
** This is the type the get method returns and the set method |
213 |
** takes in. |
** takes in. |
214 |
**/ |
**/ |
215 |
public Class getPropertyType() |
public Class<?> getPropertyType() |
216 |
{ |
{ |
217 |
return propertyType; |
return propertyType; |
218 |
} |
} |
329 |
} |
} |
330 |
|
|
331 |
/** Get the PropertyEditor class. Defaults to null. **/ |
/** Get the PropertyEditor class. Defaults to null. **/ |
332 |
public Class getPropertyEditorClass() |
public Class<?> getPropertyEditorClass() |
333 |
{ |
{ |
334 |
return propertyEditorClass; |
return propertyEditorClass; |
335 |
} |
} |
340 |
** @param propertyEditorClass the PropertyEditor class for this |
** @param propertyEditorClass the PropertyEditor class for this |
341 |
** class to use. |
** class to use. |
342 |
**/ |
**/ |
343 |
public void setPropertyEditorClass(Class propertyEditorClass) |
public void setPropertyEditorClass(Class<?> propertyEditorClass) |
344 |
{ |
{ |
345 |
this.propertyEditorClass = propertyEditorClass; |
this.propertyEditorClass = propertyEditorClass; |
346 |
} |
} |
450 |
* @return The common property type of the two method. |
* @return The common property type of the two method. |
451 |
* @throws IntrospectionException If any of the above requirements are not met. |
* @throws IntrospectionException If any of the above requirements are not met. |
452 |
*/ |
*/ |
453 |
private Class checkMethods(Method readMethod, Method writeMethod) |
private Class<?> checkMethods(Method readMethod, Method writeMethod) |
454 |
throws IntrospectionException |
throws IntrospectionException |
455 |
{ |
{ |
456 |
Class newPropertyType = propertyType; |
Class<?> newPropertyType = propertyType; |
457 |
|
|
458 |
// a valid read method has zero arguments and a non-void return type. |
// a valid read method has zero arguments and a non-void return type. |
459 |
if (readMethod != null) |
if (readMethod != null) |