本文整理汇总了Java中javax.management.MBeanParameterInfo.getDescription方法的典型用法代码示例。如果您正苦于以下问题:Java MBeanParameterInfo.getDescription方法的具体用法?Java MBeanParameterInfo.getDescription怎么用?Java MBeanParameterInfo.getDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.management.MBeanParameterInfo
的用法示例。
在下文中一共展示了MBeanParameterInfo.getDescription方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addOperation
import javax.management.MBeanParameterInfo; //导入方法依赖的package包/类
public void addOperation(MBeanOperationInfo opInfo)
{
OperationData opData = new OperationData(opInfo.getName());
opData.setDescription(opInfo.getDescription());
opData.setImpact(opInfo.getImpact());
opData.setReturnType(opInfo.getReturnType());
int parametersCount = opInfo.getSignature().length;
if (parametersCount != 0)
{
List<ParameterData> paramList = new ArrayList<ParameterData>();
for (int i = 0; i < parametersCount; i++)
{
MBeanParameterInfo paramInfo = opInfo.getSignature()[i];
ParameterData param = new ParameterData(paramInfo.getName(), paramInfo.getDescription(),
paramInfo.getType());
paramList.add(param);
}
opData.setParameters(paramList);
}
_operationMap.put(opInfo.getName(), opData);
}
示例2: getDescription
import javax.management.MBeanParameterInfo; //导入方法依赖的package包/类
/**
* Override this method so as to prevent the description of a constructor's
* parameter being @code{null}. Open MBeans can not have @code{null} descriptions,
* but one will occur as the names of parameters aren't stored for reflection.
*
* @param constructor the constructor whose parameter needs describing.
* @param parameter the parameter to be described.
* @param sequenceNo the number of the parameter to describe.
* @return a description of the constructor's parameter.
*/
protected String getDescription(MBeanConstructorInfo constructor,
MBeanParameterInfo parameter,
int sequenceNo)
{
String desc = parameter.getDescription();
if (desc == null)
return "param" + sequenceNo;
else
return desc;
}
示例3: getDescription
import javax.management.MBeanParameterInfo; //导入方法依赖的package包/类
/**
* Override this method so as to prevent the description of a constructor's
* parameter being @code{null}. Open MBeans can not have @code{null} descriptions,
* but one will occur as the names of parameters aren't stored for reflection.
*
* @param constructor the constructor whose parameter needs describing.
* @param parameter the parameter to be described.
* @param sequenceNo the number of the parameter to describe.
* @return a description of the constructor's parameter.
*/
protected String getDescription(MBeanConstructorInfo constructor,
MBeanParameterInfo parameter,
int sequenceNo)
{
String desc = parameter.getDescription();
if (desc == null)
return "param" + sequenceNo;
else
return desc;
}