1 | public class UidIdentifierBeanInfo extends SimpleBeanInfo↵ | | 1 | public class StringWrapperBeanInfo extends SimpleBeanInfo↵
|
2 | {↵ | | 2 | {↵
|
|
3 | /**↵ | | 3 | /**↵
|
4 | * See http://tinyurl.com/63no6t for discussion of the proper thread-safe way to implement↵ | | 4 | * See http://tinyurl.com/63no6t for discussion of the proper thread-safe way to implement↵
|
5 | * getPropertyDescriptors().↵ | | 5 | * getPropertyDescriptors().↵
|
6 | * ↵ | | 6 | * ↵
|
7 | * @see java.beans.SimpleBeanInfo#getPropertyDescriptors()↵ | | 7 | * @see java.beans.SimpleBeanInfo#getPropertyDescriptors()↵
|
8 | */↵ | | 8 | */↵
|
9 | @Override ↵ | | 9 | @Override↵
|
10 | public PropertyDescriptor[] getPropertyDescriptors()↵ | | 10 | public PropertyDescriptor[] getPropertyDescriptors()↵
|
11 | {↵ | | 11 | {↵
|
12 | try↵ | | 12 | try↵
|
13 | {↵ | | 13 | {↵
|
14 | PropertyDescriptor[] result = new PropertyDescriptor[1];↵ | | 14 | PropertyDescriptor[] result = new PropertyDescriptor[1];↵
|
15 | result[0] =↵ | | 15 | result[0] =↵
|
16 | new PropertyDescriptor(↵ | | 16 | new PropertyDescriptor(↵
|
17 | UidIdentifier.IPropertyNames.STRING,↵ | | 17 | StringWrapper.IPropertyNames.STRING↵
|
18 | UidIdentifier.class,↵ | | |
|
19 | "toString",↵ | | 18 | S, StringWrapper.class, "getString",↵
|
20 | "setString");↵ | | 19 | "setString");↵
|
21 | ↵ | | |
|
22 | return result;↵ | | 20 | return result;↵
|
23 | }↵ | | 21 | }↵
|
24 | catch (IntrospectionException e)↵ | | 22 | catch (IntrospectionException e)↵
|
25 | {↵ | | 23 | {↵
|
26 | throw new Error(e) | | 24 | throw new Error(e)
|