/**
* Returns the ModelMBeanConstructorInfo requested by name.
* If no ModelMBeanConstructorInfo exists for this name null is returned.
*
* @param inName the name of the constructor.
*
* @return the constructor info for the named constructor, or null
* if there is none.
*
* @exception MBeanException Wraps a distributed communication Exception.
* @exception RuntimeOperationsException Wraps an IllegalArgumentException
* for a null constructor name.
*/
public ModelMBeanConstructorInfo getConstructor(String inName)
throws MBeanException, RuntimeOperationsException {
ModelMBeanConstructorInfo retInfo = null;
if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
MODELMBEAN_LOGGER.logp(Level.FINER,
ModelMBeanInfoSupport.class.getName(),
"getConstructor(String)", "Entry");
}
if (inName == null) {
throw new RuntimeOperationsException(
new IllegalArgumentException("Constructor name is null"),
"Exception occurred trying to get the " +
"ModelMBeanConstructorInfo of the MBean");
}
MBeanConstructorInfo[] consList = modelMBeanConstructors; //this.getConstructors();
int numCons = 0;
if (consList != null) numCons = consList.length;
for (int i=0; (i < numCons) && (retInfo == null); i++) {
if (inName.equals(consList[i].getName())) {
retInfo = ((ModelMBeanConstructorInfo) consList[i].clone());
}
}
if (MODELMBEAN_LOGGER.isLoggable(Level.FINER)) {
MODELMBEAN_LOGGER.logp(Level.FINER,
ModelMBeanInfoSupport.class.getName(),
"getConstructor(String)", "Exit");
}
return retInfo;
}
ModelMBeanInfoSupport.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:OpenJSharp
作者:
评论列表
文章目录