test_class.declarator: metricRegistry = new Metric2Registry()
test_class.modifier: private
test_class.original_string: private Metric2Registry metricRegistry = new Metric2Registry();
test_class.type: Metric2Registry
test_class.var_name: metricRegistry
test_class.file: stagemonitor-core/src/test/java/org/stagemonitor/core/util/MBeanUtilsTest.java
test_class.identifier: MBeanUtilsTest
test_case.body: @Test
  	public void testRegisterMBean() throws Exception {
  		MBeanUtils.registerMBean(MBeanUtils.queryMBean("java.lang:type=ClassLoading"), "LoadedClassCount", name("jvm_class_count").build(), metricRegistry);
  		final Gauge classLoadingGauge = metricRegistry.getGauges().get(name("jvm_class_count").build());
  		assertNotNull(classLoadingGauge);
  		assertTrue(((Integer) classLoadingGauge.getValue()) > 1);
  	}
test_case.class_method_signature: MBeanUtilsTest.testRegisterMBean()
test_case.full_signature: @Test public void testRegisterMBean()
test_case.identifier: testRegisterMBean
test_case.invocations: registerMBean queryMBean build name get getGauges build name assertNotNull assertTrue getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testRegisterMBean()
focal_class.declarator: logger = LoggerFactory.getLogger(MBeanUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(MBeanUtils.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: mbeanServer = ManagementFactory.getPlatformMBeanServer()
focal_class.modifier: private static final
focal_class.original_string: private static final MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
focal_class.type: MBeanServer
focal_class.var_name: mbeanServer
focal_class.file: stagemonitor-core/src/main/java/org/stagemonitor/core/util/MBeanUtils.java
focal_class.identifier: MBeanUtils
focal_class.class_method_signature: MBeanUtils.MBeanUtils()
focal_class.full_signature: private  MBeanUtils()
focal_class.identifier: MBeanUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  MBeanUtils()
focal_class.class_method_signature: MBeanUtils.queryMBean(String objectName)
focal_class.full_signature: public static ObjectInstance queryMBean(String objectName)
focal_class.identifier: queryMBean
focal_class.modifiers: public static
focal_class.parameters: (String objectName)
focal_class.return: ObjectInstance
focal_class.signature: ObjectInstance queryMBean(String objectName)
focal_class.class_method_signature: MBeanUtils.queryMBeans(String objectName)
focal_class.full_signature: public static Set<ObjectInstance> queryMBeans(String objectName)
focal_class.identifier: queryMBeans
focal_class.modifiers: public static
focal_class.parameters: (String objectName)
focal_class.return: Set<ObjectInstance>
focal_class.signature: Set<ObjectInstance> queryMBeans(String objectName)
focal_class.class_method_signature: MBeanUtils.queryMBeans(ObjectName objectName, QueryExp queryExp)
focal_class.full_signature: public static Set<ObjectInstance> queryMBeans(ObjectName objectName, QueryExp queryExp)
focal_class.identifier: queryMBeans
focal_class.modifiers: public static
focal_class.parameters: (ObjectName objectName, QueryExp queryExp)
focal_class.return: Set<ObjectInstance>
focal_class.signature: Set<ObjectInstance> queryMBeans(ObjectName objectName, QueryExp queryExp)
focal_class.class_method_signature: MBeanUtils.registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_class.full_signature: public static void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_class.identifier: registerMBean
focal_class.modifiers: public static
focal_class.parameters: (final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_class.return: void
focal_class.signature: void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_class.class_method_signature: MBeanUtils.getValueFromMBean(ObjectInstance objectInstance, String mBeanAttributeName)
focal_class.full_signature: public static Object getValueFromMBean(ObjectInstance objectInstance, String mBeanAttributeName)
focal_class.identifier: getValueFromMBean
focal_class.modifiers: public static
focal_class.parameters: (ObjectInstance objectInstance, String mBeanAttributeName)
focal_class.return: Object
focal_class.signature: Object getValueFromMBean(ObjectInstance objectInstance, String mBeanAttributeName)
focal_method.body: public static void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry) {
  		metricRegistry.register(metricName, new Gauge<Object>() {
  			@Override
  			public Object getValue() {
  				return getValueFromMBean(objectInstance, mBeanAttributeName);
  			}
  		});
  	}
focal_method.class_method_signature: MBeanUtils.registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_method.full_signature: public static void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_method.identifier: registerMBean
focal_method.invocations: register getValueFromMBean
focal_method.modifiers: public static
focal_method.parameters: (final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)
focal_method.return: void
focal_method.signature: void registerMBean(final ObjectInstance objectInstance, final String mBeanAttributeName, MetricName metricName, Metric2Registry metricRegistry)