### Question:
MBeans { public static Map<String, Object> map( final ObjectName name ) { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); return map(server, name); }  static String toJson(); static String toJson(final MBeanServer server); static Map<String, Object> map(  final ObjectName name ); static Map<String, Object> map( final MBeanServer server,
                                           final ObjectName name ); static String[] getAttributeNames( MBeanInfo info ); static DynamicMBean createMBean( final Object instance, final Class<?> managedInterface ); static void registerMBean( final String prefix, final String name, final Object mbean );  }### Answer:
@Test public void test() throws Exception { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); Set<ObjectName> objectNames = server.queryNames( null, null ); for ( ObjectName name : objectNames ) { System.out.println( name.toString() ); System.out.println( MBeans.map( server, name ) ); } }