ModelMBeanInfoSupport.java 文件源码

java
阅读 22 收藏 0 点赞 0 评论 0

项目:openjdk-jdk10 作者:
public ModelMBeanOperationInfo getOperation(String inName)
throws MBeanException, RuntimeOperationsException {
    ModelMBeanOperationInfo retInfo = null;
    if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
        MODELMBEAN_LOGGER.log(Level.TRACE, "Entry");
    }
    if (inName == null) {
        throw new RuntimeOperationsException(
                new IllegalArgumentException("inName is null"),
                "Exception occurred trying to get the " +
                "ModelMBeanOperationInfo of the MBean");
    }
    MBeanOperationInfo[] operList = modelMBeanOperations; //this.getOperations();
    int numOpers = 0;
    if (operList != null) numOpers = operList.length;

    for (int i=0; (i < numOpers) && (retInfo == null); i++) {
        if (inName.equals(operList[i].getName())) {
            retInfo = ((ModelMBeanOperationInfo) operList[i].clone());
        }
    }
    if (MODELMBEAN_LOGGER.isLoggable(Level.TRACE)) {
        MODELMBEAN_LOGGER.log(Level.TRACE, "Exit");
    }

    return retInfo;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号