/[classpath]/classpath/java/beans/PropertyDescriptor.java
ViewVC logotype

Diff of /classpath/java/beans/PropertyDescriptor.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.10.2.1 by gnu_andrew, Sun Jan 16 02:14:47 2005 UTC revision 1.10.2.2 by gnu_andrew, Sun Jan 16 15:15:11 2005 UTC
# Line 126  public class PropertyDescriptor extends Line 126  public class PropertyDescriptor extends
126          }          }
127    
128          // finally check the methods compatibility                  // finally check the methods compatibility        
129          checkMethods(getMethod, setMethod);          propertyType = checkMethods(getMethod, setMethod);
130      }      }
131    
132      /** Create a new PropertyDescriptor by introspection.      /** Create a new PropertyDescriptor by introspection.
# Line 178  public class PropertyDescriptor extends Line 178  public class PropertyDescriptor extends
178                  "Cannot find a setter method called " + setMethodName);                  "Cannot find a setter method called " + setMethodName);
179          }          }
180    
181          checkMethods(getMethod, setMethod);          propertyType = checkMethods(getMethod, setMethod);
182      }      }
183    
184      /** Create a new PropertyDescriptor using explicit Methods.      /** Create a new PropertyDescriptor using explicit Methods.
# Line 205  public class PropertyDescriptor extends Line 205  public class PropertyDescriptor extends
205          setName(name);          setName(name);
206          getMethod = readMethod;          getMethod = readMethod;
207          setMethod = writeMethod;          setMethod = writeMethod;
208            propertyType = checkMethods(getMethod, setMethod);
         if (getMethod != null)  
         {  
             this.propertyType = getMethod.getReturnType();  
         }  
         else if (setMethod != null)  
         {  
             this.propertyType = setMethod.getParameterTypes()[0];  
         }  
   
         checkMethods(getMethod, setMethod);  
209      }      }
210    
211      /** Get the property type.      /** Get the property type.
# Line 250  public class PropertyDescriptor extends Line 240  public class PropertyDescriptor extends
240       */       */
241      public void setReadMethod(Method readMethod) throws IntrospectionException      public void setReadMethod(Method readMethod) throws IntrospectionException
242      {      {
243          checkMethods(readMethod, setMethod);          propertyType = checkMethods(readMethod, setMethod);
244    
245          getMethod = readMethod;          getMethod = readMethod;
246      }      }

Legend:
Removed from v.1.10.2.1  
changed lines
  Added in v.1.10.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26