1 | public class SQLDriverPropertyCollectionBeanInfo extends SimpleBeanInfo↵ | | 1 | public class StringWrapperBeanInfo extends SimpleBeanInfo↵
|
2 | {↵ | | 2 | {↵
|
|
3 | private interface IPropNames extends SQLDriverPropertyCollection.IPropertyNames↵ | | |
|
4 | {↵ | | |
|
5 | // Empty body.↵ | | |
|
6 | }↵ | | |
|
|
7 | /**↵ | | 3 | /**↵
|
8 | * 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↵
|
9 | * getPropertyDescriptors().↵ | | 5 | * getPropertyDescriptors().↵
|
10 | * ↵ | | 6 | * ↵
|
11 | * @see java.beans.SimpleBeanInfo#getPropertyDescriptors()↵ | | 7 | * @see java.beans.SimpleBeanInfo#getPropertyDescriptors()↵
|
12 | */↵ | | 8 | */↵
|
13 | ↵ | | 9 | @Override↵
|
14 | public PropertyDescriptor[] getPropertyDescriptors()↵ | | 10 | public PropertyDescriptor[] getPropertyDescriptors()↵
|
15 | {↵ | | 11 | {↵
|
16 | try↵ | | 12 | try↵
|
17 | {↵ | | 13 | {↵
|
18 | PropertyDescriptor[] result = new PropertyDescriptor[1];↵ | | 14 | PropertyDescriptor[] result = new PropertyDescriptor[1];↵
|
19 | result[0] = new Indexed↵ | | 15 | result[0] =↵
|
20 | PropertyDescriptor(IPropNames.DRIVER_PROPERTIES,↵ | | 16 | new PropertyDescriptor(StringWrapper.IPropertyNames.↵
|
21 | SQLDriverPropertyCollection.class,↵ | | |
|
22 | "getDriverProperties", "setDriverProperties",↵ | | 17 | STRINGS, StringWrapper.class, "getString",↵
|
23 | "getDriverProperty", "setDriverProperty");↵ | | 18 | "setString");↵
|
|
24 | return result;↵ | | 19 | return result;↵
|
25 | }↵ | | 20 | }↵
|
26 | catch (IntrospectionException e)↵ | | 21 | catch (IntrospectionException e)↵
|
27 | {↵ | | 22 | {↵
|
28 | throw new Error(e) | | 23 | throw new Error(e)
|