當前位置: 首頁>>代碼示例>>Java>>正文


Java CompositeData.containsKey方法代碼示例

本文整理匯總了Java中javax.management.openmbean.CompositeData.containsKey方法的典型用法代碼示例。如果您正苦於以下問題:Java CompositeData.containsKey方法的具體用法?Java CompositeData.containsKey怎麽用?Java CompositeData.containsKey使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.management.openmbean.CompositeData的用法示例。


在下文中一共展示了CompositeData.containsKey方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: fromCompositeData

import javax.management.openmbean.CompositeData; //導入方法依賴的package包/類
Object fromCompositeData(CompositeData cd,
                         String[] itemNames,
                         MXBeanMapping[] converters)
        throws InvalidObjectException {
    Object o;
    try {
        final Class<?> targetClass = getTargetClass();
        ReflectUtil.checkPackageAccess(targetClass);
        o = targetClass.newInstance();
        for (int i = 0; i < itemNames.length; i++) {
            if (cd.containsKey(itemNames[i])) {
                Object openItem = cd.get(itemNames[i]);
                Object javaItem =
                    converters[i].fromOpenValue(openItem);
                MethodUtil.invoke(setters[i], o, new Object[] {javaItem});
            }
        }
    } catch (Exception e) {
        throw invalidObjectException(e);
    }
    return o;
}
 
開發者ID:SunburstApps,項目名稱:OpenJSharp,代碼行數:23,代碼來源:DefaultMXBeanMappingFactory.java

示例2: fromCompositeData

import javax.management.openmbean.CompositeData; //導入方法依賴的package包/類
Object fromCompositeData(CompositeData cd, String[] itemNames, OpenTypeConverter[] converters)
    throws InvalidObjectException {
  Object o;
  try {
    o = getTargetClass().newInstance();
    for (int i = 0; i < itemNames.length; i++) {
      if (cd.containsKey(itemNames[i])) {
        Object openItem = cd.get(itemNames[i]);
        Object javaItem = converters[i].fromOpenValue(openItem);
        setters[i].invoke(o, javaItem);
      }
    }
  } catch (Exception e) {
    throw invalidObjectException(e);
  }
  return o;
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:18,代碼來源:OpenTypeConverter.java

示例3: fromCompositeData

import javax.management.openmbean.CompositeData; //導入方法依賴的package包/類
Object fromCompositeData(CompositeData cd,
                         String[] itemNames,
                         MXBeanMapping[] converters)
        throws InvalidObjectException {
    Object o;
    try {
        final Class<?> targetClass = getTargetClass();
        ReflectUtil.checkPackageAccess(targetClass);
        @SuppressWarnings("deprecation")
        Object tmp = targetClass.newInstance();
        o = tmp;
        for (int i = 0; i < itemNames.length; i++) {
            if (cd.containsKey(itemNames[i])) {
                Object openItem = cd.get(itemNames[i]);
                Object javaItem =
                    converters[i].fromOpenValue(openItem);
                MethodUtil.invoke(setters[i], o, new Object[] {javaItem});
            }
        }
    } catch (Exception e) {
        throw invalidObjectException(e);
    }
    return o;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:25,代碼來源:DefaultMXBeanMappingFactory.java

示例4: newTrigger

import javax.management.openmbean.CompositeData; //導入方法依賴的package包/類
public static OperableTrigger newTrigger(CompositeData cData) throws ParseException {
    CronTriggerImpl result = new CronTriggerImpl();
    result.setCronExpression((String) cData.get("cronExpression"));
    if(cData.containsKey("timeZone")) {
        result.setTimeZone(TimeZone.getTimeZone((String)cData.get("timeZone")));
    }
    TriggerSupport.initializeTrigger(result, cData);
    return result;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:10,代碼來源:CronTriggerSupport.java

示例5: newTrigger

import javax.management.openmbean.CompositeData; //導入方法依賴的package包/類
public static OperableTrigger newTrigger(CompositeData cData) throws ParseException {
    OperableTrigger result = null;
    if(cData.containsKey("cronExpression")) {
        result = CronTriggerSupport.newTrigger(cData);
    } else {
        result = SimpleTriggerSupport.newTrigger(cData);
    }
    return result;
}
 
開發者ID:lamsfoundation,項目名稱:lams,代碼行數:10,代碼來源:TriggerSupport.java


注:本文中的javax.management.openmbean.CompositeData.containsKey方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。