if (_filteredProps != null && provider.getSerializationView() != null) {
props = _filteredProps;
} else {
props = _props;
}
final BeanPropertyFilter filter = findFilter(provider);
// better also allow missing filter actually..
if (filter == null) {
serializeFields(bean, jgen0, provider);
return;
}
final int attrCount = _attributeCount;
if (attrCount > 0) {
xgen.setNextIsAttribute(true);
}
final int textIndex = _textPropertyIndex;
final QName[] xmlNames = _xmlNames;
int i = 0;
try {
for (final int len = props.length; i < len; ++i) {
if (i == attrCount) {
xgen.setNextIsAttribute(false);
}
// also: if this is property to write as text ("unwrap"), need to:
if (i == textIndex) {
xgen.setNextIsUnwrapped(true);
}
xgen.setNextName(xmlNames[i]);
BeanPropertyWriter prop = props[i];
if (prop != null) { // can have nulls in filtered list
filter.serializeAsField(bean, xgen, provider, prop);
}
}
if (_anyGetterWriter != null) {
_anyGetterWriter.getAndSerialize(bean, xgen, provider);
}