本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}