@Override
protected String getAttributeDescription(PropertyDescriptor propertyDescriptor, String beanKey) {
Method readMethod = propertyDescriptor.getReadMethod();
Method writeMethod = propertyDescriptor.getWriteMethod();
ManagedAttribute getter =
(readMethod != null) ? this.attributeSource.getManagedAttribute(readMethod) : null;
ManagedAttribute setter =
(writeMethod != null) ? this.attributeSource.getManagedAttribute(writeMethod) : null;
if (getter != null && StringUtils.hasText(getter.getDescription())) {
return getter.getDescription();
}
else if (setter != null && StringUtils.hasText(setter.getDescription())) {
return setter.getDescription();
}
ManagedMetric metric = (readMethod != null) ? this.attributeSource.getManagedMetric(readMethod) : null;
if(metric != null && StringUtils.hasText(metric.getDescription())) {
return metric.getDescription();