当前位置: 首页>>代码示例>>Java>>正文


Java OpenMBeanParameterInfo.getDefaultValue方法代码示例

本文整理汇总了Java中javax.management.openmbean.OpenMBeanParameterInfo.getDefaultValue方法的典型用法代码示例。如果您正苦于以下问题:Java OpenMBeanParameterInfo.getDefaultValue方法的具体用法?Java OpenMBeanParameterInfo.getDefaultValue怎么用?Java OpenMBeanParameterInfo.getDefaultValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.management.openmbean.OpenMBeanParameterInfo的用法示例。


在下文中一共展示了OpenMBeanParameterInfo.getDefaultValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: translateSignature

import javax.management.openmbean.OpenMBeanParameterInfo; //导入方法依赖的package包/类
private OpenMBeanParameterInfo[] translateSignature(MBeanParameterInfo[] oldS)
  throws OpenDataException
{
  OpenMBeanParameterInfo[] sig = new OpenMBeanParameterInfoSupport[oldS.length];
  for (int a = 0; a < oldS.length; ++a)
    {
      OpenMBeanParameterInfo param = Translator.translate(oldS[a].getType());
      if (param.getMinValue() == null)
        {
          Object[] lv;
          if (param.getLegalValues() == null)
            lv = null;
          else
            lv = param.getLegalValues().toArray();
          sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
                                                     oldS[a].getDescription(),
                                                     ((OpenType<Object>)
                                                      param.getOpenType()),
                                                     param.getDefaultValue(),
                                                     lv);
        }
      else
        sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
                                                   oldS[a].getDescription(),
                                                   ((OpenType<Object>)
                                                    param.getOpenType()),
                                                   param.getDefaultValue(),
                                                   ((Comparable<Object>)
                                                    param.getMinValue()),
                                                   ((Comparable<Object>)
                                                    param.getMaxValue()));
    }
  return sig;
}
 
开发者ID:vilie,项目名称:javify,代码行数:35,代码来源:BeanImpl.java

示例2: translateSignature

import javax.management.openmbean.OpenMBeanParameterInfo; //导入方法依赖的package包/类
private OpenMBeanParameterInfo[] translateSignature(MBeanParameterInfo[] oldS)
   throws OpenDataException
 {
   OpenMBeanParameterInfo[] sig = new OpenMBeanParameterInfoSupport[oldS.length];
   for (int a = 0; a < oldS.length; ++a)
     {
OpenMBeanParameterInfo param = Translator.translate(oldS[a].getType());
if (param.getMinValue() == null)
  {
    Object[] lv;
    if (param.getLegalValues() == null)
      lv = null;
    else
      lv = param.getLegalValues().toArray();
    sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
					       oldS[a].getDescription(),
					       ((OpenType<Object>)
						param.getOpenType()),
					       param.getDefaultValue(),
					       lv);
  }
else
  sig[a] = new OpenMBeanParameterInfoSupport(oldS[a].getName(),
					     oldS[a].getDescription(),
					     ((OpenType<Object>)
					      param.getOpenType()),
					     param.getDefaultValue(),
					     ((Comparable<Object>)
					      param.getMinValue()),
					     ((Comparable<Object>)
					      param.getMaxValue()));
     }
   return sig;
 }
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:35,代码来源:BeanImpl.java

示例3: cacheMBeanInfo

import javax.management.openmbean.OpenMBeanParameterInfo; //导入方法依赖的package包/类
protected void cacheMBeanInfo(MBeanInfo info)
{
  if (info == null)
    return;
  try
    {
      MBeanAttributeInfo[] oldA = info.getAttributes();
      OpenMBeanAttributeInfo[] attribs =
        new OpenMBeanAttributeInfoSupport[oldA.length];
      for (int a = 0; a < oldA.length; ++a)
        {
          OpenMBeanParameterInfo param = Translator.translate(oldA[a].getType());
          if (param.getMinValue() == null)
            {
              Object[] lv;
              if (param.getLegalValues() == null)
                lv = null;
              else
                lv = param.getLegalValues().toArray();
              attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
                                                             oldA[a].getDescription(),
                                                             ((OpenType<Object>)
                                                              param.getOpenType()),
                                                             oldA[a].isReadable(),
                                                             oldA[a].isWritable(),
                                                             oldA[a].isIs(),
                                                             param.getDefaultValue(),
                                                             lv);
            }
          else
            attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
                                                           oldA[a].getDescription(),
                                                           ((OpenType<Object>)
                                                            param.getOpenType()),
                                                           oldA[a].isReadable(),
                                                           oldA[a].isWritable(),
                                                           oldA[a].isIs(),
                                                           param.getDefaultValue(),
                                                           ((Comparable<Object>)
                                                             param.getMinValue()),
                                                           ((Comparable<Object>)
                                                             param.getMaxValue()));
        }
      MBeanConstructorInfo[] oldC = info.getConstructors();
      OpenMBeanConstructorInfo[] cons = new OpenMBeanConstructorInfoSupport[oldC.length];
      for (int a = 0; a < oldC.length; ++a)
        cons[a] =
          new OpenMBeanConstructorInfoSupport(oldC[a].getName(),
                                              oldC[a].getDescription(),
                                              translateSignature(oldC[a].getSignature()));
      MBeanOperationInfo[] oldO = info.getOperations();
      OpenMBeanOperationInfo[] ops = new OpenMBeanOperationInfoSupport[oldO.length];
      for (int a = 0; a < oldO.length; ++a)
        ops[a] =
      new OpenMBeanOperationInfoSupport(oldO[a].getName(),
                                        oldO[a].getDescription(),
                                        translateSignature(oldO[a].getSignature()),
                                        Translator.translate(oldO[a].getReturnType()).getOpenType(),
                                        oldO[a].getImpact());
      openInfo = new OpenMBeanInfoSupport(info.getClassName(), info.getDescription(),
                                          attribs, cons, ops, info.getNotifications());
    }
  catch (OpenDataException e)
    {
      throw (InternalError) (new InternalError("A problem occurred creating the open type " +
                                               "descriptors.").initCause(e));
    }
}
 
开发者ID:vilie,项目名称:javify,代码行数:69,代码来源:BeanImpl.java

示例4: cacheMBeanInfo

import javax.management.openmbean.OpenMBeanParameterInfo; //导入方法依赖的package包/类
protected void cacheMBeanInfo(MBeanInfo info)
 {
   if (info == null)
     return;
   try
     {
MBeanAttributeInfo[] oldA = info.getAttributes();
OpenMBeanAttributeInfo[] attribs =
  new OpenMBeanAttributeInfoSupport[oldA.length];
for (int a = 0; a < oldA.length; ++a)
  {
    OpenMBeanParameterInfo param = Translator.translate(oldA[a].getType());
    if (param.getMinValue() == null)
      {
	Object[] lv;
	if (param.getLegalValues() == null)
	  lv = null;
	else
	  lv = param.getLegalValues().toArray();
	attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
						       oldA[a].getDescription(),
						       ((OpenType<Object>)
							param.getOpenType()),
						       oldA[a].isReadable(),
						       oldA[a].isWritable(),
						       oldA[a].isIs(),
						       param.getDefaultValue(),
						       lv);
      }
    else
      attribs[a] = new OpenMBeanAttributeInfoSupport(oldA[a].getName(),
						     oldA[a].getDescription(),
						     ((OpenType<Object>)
						      param.getOpenType()),
						     oldA[a].isReadable(),
						     oldA[a].isWritable(),
						     oldA[a].isIs(),
						     param.getDefaultValue(),
						     ((Comparable<Object>)
						       param.getMinValue()),
						     ((Comparable<Object>)
						       param.getMaxValue()));
  }
MBeanConstructorInfo[] oldC = info.getConstructors();
OpenMBeanConstructorInfo[] cons = new OpenMBeanConstructorInfoSupport[oldC.length];
for (int a = 0; a < oldC.length; ++a)
  cons[a] =
    new OpenMBeanConstructorInfoSupport(oldC[a].getName(),
					oldC[a].getDescription(),
					translateSignature(oldC[a].getSignature()));
MBeanOperationInfo[] oldO = info.getOperations();
OpenMBeanOperationInfo[] ops = new OpenMBeanOperationInfoSupport[oldO.length];
for (int a = 0; a < oldO.length; ++a)
  ops[a] =
new OpenMBeanOperationInfoSupport(oldO[a].getName(),
				  oldO[a].getDescription(),
				  translateSignature(oldO[a].getSignature()),
				  Translator.translate(oldO[a].getReturnType()).getOpenType(),
				  oldO[a].getImpact());
openInfo = new OpenMBeanInfoSupport(info.getClassName(), info.getDescription(),
				    attribs, cons, ops, info.getNotifications());
     }
   catch (OpenDataException e)
     {
throw (InternalError) (new InternalError("A problem occurred creating the open type " +
					 "descriptors.").initCause(e));
     }
 }
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:69,代码来源:BeanImpl.java


注:本文中的javax.management.openmbean.OpenMBeanParameterInfo.getDefaultValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。