/**
* Constructs a ModelMBeanInfoSupport which is a duplicate of the given
* ModelMBeanInfo. The returned object is a shallow copy of the given
* object. Neither the Descriptor nor the contained arrays
* ({@code ModelMBeanAttributeInfo[]} etc) are cloned. This method is
* chiefly of interest to modify the Descriptor of the returned instance
* via {@link #setDescriptor setDescriptor} without affecting the
* Descriptor of the original object.
*
* @param mbi the ModelMBeanInfo instance from which the ModelMBeanInfo
* being created is initialized.
*/
public ModelMBeanInfoSupport(ModelMBeanInfo mbi) {
super(mbi.getClassName(),
mbi.getDescription(),
mbi.getAttributes(),
mbi.getConstructors(),
mbi.getOperations(),
mbi.getNotifications());
modelMBeanAttributes = mbi.getAttributes();
modelMBeanConstructors = mbi.getConstructors();
modelMBeanOperations = mbi.getOperations();
modelMBeanNotifications = mbi.getNotifications();
try {
Descriptor mbeandescriptor = mbi.getMBeanDescriptor();
modelMBeanDescriptor = validDescriptor(mbeandescriptor);
} catch (MBeanException mbe) {
modelMBeanDescriptor = validDescriptor(null);
if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
MODELMBEAN_LOGGER.log(Level.TRACE,
"ModelMBeanInfo(ModelMBeanInfo) " +
"Could not get a valid modelMBeanDescriptor, " +
"setting a default Descriptor");
}
}
if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
MODELMBEAN_LOGGER.log(Level.TRACE, "Exit");
}
}
ModelMBeanInfoSupport.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:openjdk-jdk10
作者:
评论列表
文章目录