public void setModelMBeanInfo(ModelMBeanInfo modelMBeanInfo)
      throws MBeanException, RuntimeOperationsException {
    if (modelMBeanInfo == null)
      throw new RuntimeOperationsException(
          new IllegalArgumentException(
              LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_CANNOT_BE_NULL.toLocalizedString()));
    if (!isModelMBeanInfoValid(modelMBeanInfo))
      throw new RuntimeOperationsException(
          new IllegalArgumentException(
              LocalizedStrings.MX4JModelMBean_MODELMBEANINFO_IS_INVALID.toLocalizedString()));

    m_modelMBeanInfo = (ModelMBeanInfo) modelMBeanInfo.clone();

    Logger logger = getLogger();
    if (logger.isEnabledFor(Logger.DEBUG))
      logger.debug("ModelMBeanInfo successfully set to: " + m_modelMBeanInfo);
    // Only now the MBean can be registered in the MBeanServer
    m_canBeRegistered = true;
  }
 public MBeanInfo getMBeanInfo() {
   return m_modelMBeanInfo == null ? null : (MBeanInfo) m_modelMBeanInfo.clone();
 }