本文整理了Java中javax.management.AttributeList.toArray()
方法的一些代码示例,展示了AttributeList.toArray()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeList.toArray()
方法的具体详情如下:
包路径:javax.management.AttributeList
类名称:AttributeList
方法名:toArray
暂无
代码示例来源:origin: apache/cloudstack
@Override
public synchronized AttributeList setAttributes(AttributeList list) {
Attribute[] attrs = list.toArray(new Attribute[0]);
AttributeList retList = new AttributeList();
for (Attribute attr : attrs) {
String name = attr.getName();
Object value = attr.getValue();
_propMap.put(name, value);
retList.add(new Attribute(name, value));
}
return retList;
}
代码示例来源:origin: net.sf.ehcache/ehcache
/**
* Set an attribute list.
*/
public AttributeList setAttributes(AttributeList list) {
Attribute[] attrs = list.toArray(new Attribute[0]);
AttributeList retlist = new AttributeList();
for (Attribute attr : attrs) {
String name = attr.getName();
AttributeProxy a = map.get(name);
if (a != null && a.isWrite()) {
a.set(name, attr.getValue());
retlist.add(attr);
}
}
return retlist;
}
代码示例来源:origin: net.openhft/chronicle-engine
@NotNull
public synchronized AttributeList setAttributes(@NotNull AttributeList list) {
@NotNull Attribute[] attrs = list.toArray(new Attribute[0]);
@NotNull AttributeList retlist = new AttributeList();
for (@NotNull Attribute attr : attrs) {
String name = attr.getName();
Object value = attr.getValue();
if ((value instanceof String)) {
this.properties.setProperty(name, (String) value);
retlist.add(new Attribute(name, value));
}
}
return retlist;
}
代码示例来源:origin: de.mhus.lib/mhu-lib-core
public AttributeList setAttributes(Object o, AttributeList attributes) {
Attribute[] attrs = (Attribute[]) attributes.toArray(new Attribute[0]);
AttributeList retlist = new AttributeList();
for (Attribute attr : attrs) {
String name = attr.getName();
Object value = attr.getValue();
try {
setAttribute(o, attr);
retlist.add(new Attribute(name, value));
} catch (Exception e) {
}
}
return retlist;
}
代码示例来源:origin: net.sf.ehcache.internal/ehcache-core
/**
* Set an attribute list.
*/
public AttributeList setAttributes(AttributeList list) {
Attribute[] attrs = list.toArray(new Attribute[0]);
AttributeList retlist = new AttributeList();
for (Attribute attr : attrs) {
String name = attr.getName();
AttributeProxy a = map.get(name);
if (a != null && a.isWrite()) {
a.set(name, attr.getValue());
retlist.add(attr);
}
}
return retlist;
}
代码示例来源:origin: org.sonatype.nexus.bundles/org.sonatype.nexus.bundles.ehcache
/**
* Set an attribute list.
*/
public AttributeList setAttributes(AttributeList list) {
Attribute[] attrs = list.toArray(new Attribute[0]);
AttributeList retlist = new AttributeList();
for (Attribute attr : attrs) {
String name = attr.getName();
AttributeProxy a = map.get(name);
if (a != null && a.isWrite()) {
a.set(name, attr.getValue());
retlist.add(attr);
}
}
return retlist;
}
代码示例来源:origin: apache/felix
public AttributeList setAttributes(MBeanMetaData metadata, AttributeList attributes)
{
Object[] secured = filterAttributes(metadata.info.getClassName(), metadata.name, attributes.toArray(), false);
AttributeList list = new AttributeList();
for (int i = 0; i < secured.length; ++i) list.add(secured[i]);
return super.setAttributes(metadata, list);
}
内容来源于网络,如有侵权,请联系作者删除!