MBeanInfo info = (MBeanInfo)mbeanInfoCache.get(metadata.getMBean().getClass());
if (info != null) return info;
}
// This is a non-standard extension: description for standard MBeans
MBeanDescription description = createMBeanDescription(metadata);
MBeanConstructorInfo[] ctors = createMBeanConstructorInfo(metadata, description);
if (ctors == null) return null;
MBeanAttributeInfo[] attrs = createMBeanAttributeInfo(metadata, description);
if (attrs == null) return null;
MBeanOperationInfo[] opers = createMBeanOperationInfo(metadata, description);
if (opers == null) return null;
MBeanNotificationInfo[] notifs = createMBeanNotificationInfo(metadata);
if (notifs == null) return null;
MBeanInfo info = new MBeanInfo(metadata.getMBean().getClass().getName(), description.getMBeanDescription(), attrs, ctors, opers, notifs);
synchronized (mbeanInfoCache)
{
// Overwrite if already present, we've been unlucky
mbeanInfoCache.put(metadata.getMBean().getClass(), info);
}