{
final ArrayList propertyNames = new ArrayList();
final PropertyDescriptor[] pd = getPropertyInfos();
for (int i = 0; i < pd.length; i++)
{
final PropertyDescriptor property = pd[i];
if (property.isHidden())
{
continue;
}
if (property.getReadMethod() == null ||
property.getWriteMethod() == null)
{
// it will make no sense to write a property now, that
// we can't read in later...
continue;
}
if (BeanUtility.getPropertyType(property).isArray())
{
final int max = findMaximumIndex(property);
for (int idx = 0; idx < max; idx++)
{
propertyNames.add(property.getName() + '[' + idx + ']');
}
}
else
{
propertyNames.add(property.getName());
}
}
return (String[]) propertyNames.toArray(new String[propertyNames.size()]);
}