MetricProps metric = new MetricProps(property);
String displayName = withNamePrefix ? "[" + mbean.objectName() + "] " + rhqMetric.displayName() : rhqMetric.displayName();
metric.setDisplayName(displayName);
metric.setDisplayType(rhqMetric.displayType());
metric.setDataType(rhqMetric.dataType());
metric.setUnits(rhqMetric.units());
if (managedAttr != null) {
debug("Metric has ManagedAttribute annotation " + managedAttr);
metric.setDescription(managedAttr.description());
} else if (managedOp != null) {
debug("Metric has ManagedOperation annotation " + managedOp);