if (setter != null) {
if (setter.getParameterTypes().length == 0) {
// Setter method without any parameters.
setter.invoke(component);
} else {
AttributeParser parser = getParserFor(setter
.getParameterTypes()[0]);
if (parser != null) {
// We have a handler that knows how to handle
// conversion
// for this property.
String attributeValue = attribute.getValue();
if (attributeValue == null
|| attributeValue.length() == 0) {
// No need for conversion.
invokeWithAttributeFilters(setter, component,
attributeValue);
} else {
// Ask the AttributeHandler to convert the
// value.
invokeWithAttributeFilters(setter, component,
parser.getValueAs(attributeValue,
setter.getParameterTypes()[0],
component));
}
}
}