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

Diff of /classpath/java/beans/IndexedPropertyDescriptor.java

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

revision 1.9.2.1 by gnu_andrew, Tue Aug 2 20:12:16 2005 UTC revision 1.9.2.2 by gnu_andrew, Sun Oct 16 17:12:06 2005 UTC
# Line 77  import java.lang.reflect.Method; Line 77  import java.lang.reflect.Method;
77   **/   **/
78    
79  public class IndexedPropertyDescriptor extends PropertyDescriptor {  public class IndexedPropertyDescriptor extends PropertyDescriptor {
80          private Class indexedPropertyType;          private Class<?> indexedPropertyType;
81          private Method setIndex;          private Method setIndex;
82          private Method getIndex;          private Method getIndex;
83    
# Line 110  public class IndexedPropertyDescriptor e Line 110  public class IndexedPropertyDescriptor e
110           ** @param beanClass the class the get and set methods live in.           ** @param beanClass the class the get and set methods live in.
111           ** @exception IntrospectionException if the methods are not found or invalid.           ** @exception IntrospectionException if the methods are not found or invalid.
112           **/           **/
113          public IndexedPropertyDescriptor(String name, Class beanClass) throws IntrospectionException {          public IndexedPropertyDescriptor(String name, Class<?> beanClass) throws IntrospectionException {
114                  super(name);                  super(name);
115                  String capitalized;                  String capitalized;
116                  try {                  try {
# Line 150  public class IndexedPropertyDescriptor e Line 150  public class IndexedPropertyDescriptor e
150           ** @param setIndexName the name of the set index method.           ** @param setIndexName the name of the set index method.
151           ** @exception IntrospectionException if the methods are not found or invalid.           ** @exception IntrospectionException if the methods are not found or invalid.
152           **/           **/
153          public IndexedPropertyDescriptor(String name, Class beanClass, String getMethodName, String setMethodName, String getIndexName, String setIndexName) throws IntrospectionException {          public IndexedPropertyDescriptor(String name, Class<?> beanClass, String getMethodName, String setMethodName, String getIndexName, String setIndexName) throws IntrospectionException {
154                  super(name);                  super(name);
155                  findMethods(beanClass, getMethodName, setMethodName, getIndexName, setIndexName);                  findMethods(beanClass, getMethodName, setMethodName, getIndexName, setIndexName);
156          }          }
# Line 221  public class IndexedPropertyDescriptor e Line 221  public class IndexedPropertyDescriptor e
221                  this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass());                  this.propertyType = getMethod != null ? getMethod.getReturnType() : (setMethod != null ? setMethod.getParameterTypes()[0] : Array.newInstance(this.indexedPropertyType,0).getClass());
222          }          }
223    
224          public Class getIndexedPropertyType() {          public Class<?> getIndexedPropertyType() {
225                  return indexedPropertyType;                  return indexedPropertyType;
226          }          }
227    

Legend:
Removed from v.1.9.2.1  
changed lines
  Added in v.1.9.2.2

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