if (obj instanceof MBeanInfoWrapper) {
MBeanInfoWrapper wrapper = (MBeanInfoWrapper) obj;
return wrapper.getObjectName().toString();
}
if (obj instanceof MBeanOperationInfoWrapper) {
MBeanOperationInfoWrapper wrapper = (MBeanOperationInfoWrapper) obj;
return MBeanUtils.prettySignature(wrapper.getMBeanOperationInfo());
}
if (obj instanceof MBeanAttributeInfoWrapper) {
MBeanAttributeInfoWrapper wrapper = (MBeanAttributeInfoWrapper) obj;
return wrapper.getMBeanAttributeInfo().getName();
}
return obj.toString();
}