< prev index next >

jdk/src/java.desktop/share/classes/java/beans/IndexedPropertyDescriptor.java

Print this page




 135     public IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod,
 136                                             Method indexedReadMethod, Method indexedWriteMethod)
 137                 throws IntrospectionException {
 138         super(propertyName, readMethod, writeMethod);
 139 
 140         setIndexedReadMethod0(indexedReadMethod);
 141         setIndexedWriteMethod0(indexedWriteMethod);
 142 
 143         // Type checking
 144         setIndexedPropertyType(findIndexedPropertyType(indexedReadMethod, indexedWriteMethod));
 145     }
 146 
 147     /**
 148      * Creates {@code IndexedPropertyDescriptor} from the specified property info.
 149      *
 150      * @param entry  the key-value pair,
 151      *               where the {@code key} is the base name of the property (the rest of the method name)
 152      *               and the {@code value} is the automatically generated property info
 153      * @param bound  the flag indicating whether it is possible to treat this property as a bound property
 154      *
 155      * @since 1.9
 156      */
 157     IndexedPropertyDescriptor(Entry<String,PropertyInfo> entry, boolean bound) {
 158         super(entry, bound);
 159         PropertyInfo info = entry.getValue().getIndexed();
 160         setIndexedReadMethod0(info.getReadMethod());
 161         setIndexedWriteMethod0(info.getWriteMethod());
 162         setIndexedPropertyType(info.getPropertyType());
 163     }
 164 
 165     /**
 166      * Gets the method that should be used to read an indexed
 167      * property value.
 168      *
 169      * @return The method that should be used to read an indexed
 170      * property value.
 171      * May return null if the property isn't indexed or is write-only.
 172      */
 173     public synchronized Method getIndexedReadMethod() {
 174         Method indexedReadMethod = this.indexedReadMethodRef.get();
 175         if (indexedReadMethod == null) {




 135     public IndexedPropertyDescriptor(String propertyName, Method readMethod, Method writeMethod,
 136                                             Method indexedReadMethod, Method indexedWriteMethod)
 137                 throws IntrospectionException {
 138         super(propertyName, readMethod, writeMethod);
 139 
 140         setIndexedReadMethod0(indexedReadMethod);
 141         setIndexedWriteMethod0(indexedWriteMethod);
 142 
 143         // Type checking
 144         setIndexedPropertyType(findIndexedPropertyType(indexedReadMethod, indexedWriteMethod));
 145     }
 146 
 147     /**
 148      * Creates {@code IndexedPropertyDescriptor} from the specified property info.
 149      *
 150      * @param entry  the key-value pair,
 151      *               where the {@code key} is the base name of the property (the rest of the method name)
 152      *               and the {@code value} is the automatically generated property info
 153      * @param bound  the flag indicating whether it is possible to treat this property as a bound property
 154      *
 155      * @since 9
 156      */
 157     IndexedPropertyDescriptor(Entry<String,PropertyInfo> entry, boolean bound) {
 158         super(entry, bound);
 159         PropertyInfo info = entry.getValue().getIndexed();
 160         setIndexedReadMethod0(info.getReadMethod());
 161         setIndexedWriteMethod0(info.getWriteMethod());
 162         setIndexedPropertyType(info.getPropertyType());
 163     }
 164 
 165     /**
 166      * Gets the method that should be used to read an indexed
 167      * property value.
 168      *
 169      * @return The method that should be used to read an indexed
 170      * property value.
 171      * May return null if the property isn't indexed or is write-only.
 172      */
 173     public synchronized Method getIndexedReadMethod() {
 174         Method indexedReadMethod = this.indexedReadMethodRef.get();
 175         if (indexedReadMethod == null) {


< prev index next >