List of usage examples for javax.management Descriptor getFieldNames
public String[] getFieldNames();
From source file:com.proofpoint.jmx.MBeanRepresentation.java
private static Map<String, Object> toMap(Descriptor descriptor) { ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder(); for (String fieldName : descriptor.getFieldNames()) { Object fieldValue = descriptor.getFieldValue(fieldName); if (fieldValue != null) { if (fieldValue instanceof Descriptor) { fieldValue = toMap((Descriptor) fieldValue); }/*from w w w . ja v a 2 s.c om*/ builder.put(fieldName, fieldValue); } } ImmutableMap<String, Object> map = builder.build(); if (!map.isEmpty()) { return map; } else { return null; } }