BeanPropertyWriter[] filteredProperties)
{
int attrCount = 0;
for (int i = 0, len = properties.length; i < len; ++i) {
BeanPropertyWriter bpw = properties[i];
if (!_isAttribute(bpw)) {
continue;
}
// Swap if attribute and there are preceding elements:
if (attrCount < i) {
properties[i] = properties[attrCount];
properties[attrCount] = bpw;
if (filteredProperties != null) {
BeanPropertyWriter fbpw = filteredProperties[i];
filteredProperties[i] = filteredProperties[attrCount];
filteredProperties[attrCount] = fbpw;
}
}
++attrCount;