String displayName = withNamePrefix ? "[" + mbean.objectName() + "] " + managedAttr.displayName() : managedAttr.displayName();
validateDisplayName(displayName);
metric.setAttribute("property", property);
metric.setAttribute("displayName", displayName);
metric.setAttribute("displayType", managedAttr.displayType().toString());
metric.setAttribute("dataType", managedAttr.dataType().toString());
metric.setAttribute("units", managedAttr.units().toString());
metric.setAttribute("description", managedAttr.description());
parent.appendChild(metric);
}
}