/** * Get the names of all properties, sorted alphabetically * @return String[] */ public String[] getPropertyNames() { if (names == null) { PropertyDescriptor[] pds = getPropertyDescriptors(); names = new String[pds.length]; for (int i = 0; i < names.length; i++) { names[i] = pds[i].getName(); } } return names; }
public int getPropertyCount() { if (beanInfo.isAtomic()) { return 0; } return getPropertyDescriptors().length; }
/** * Finds the property descriptor corresponding to the current property * index. * @return PropertyDescriptor */ private PropertyDescriptor getPropertyDescriptor() { if (propertyDescriptor == null) { int inx = getPropertyIndex(); if (inx == UNSPECIFIED_PROPERTY) { propertyDescriptor = beanInfo.getPropertyDescriptor(propertyName); } else { PropertyDescriptor[] propertyDescriptors = getPropertyDescriptors(); if (inx >= 0 && inx < propertyDescriptors.length) { propertyDescriptor = propertyDescriptors[inx]; } else { propertyDescriptor = null; } } } return propertyDescriptor; }