test_class.file: sjk-core/src/test/java/org/gridkit/jvmtool/MBeanHelperTest.java
test_class.identifier: MBeanHelperTest
test_case.body: @Test
      public void test_thread_bean_describer() throws Exception {
          MBeanHelper helper = new MBeanHelper(ManagementFactory.getPlatformMBeanServer());
          System.out.println(helper.describe(threadMXBean()));
      }
test_case.class_method_signature: MBeanHelperTest.test_thread_bean_describer()
test_case.full_signature: @Test public void test_thread_bean_describer()
test_case.identifier: test_thread_bean_describer
test_case.invocations: getPlatformMBeanServer println describe threadMXBean
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void test_thread_bean_describer()
focal_class.declarator: FORMAT_TABLE_COLUMN_WIDTH_THRESHOLD = "table.column.maxWidth"
focal_class.modifier: public static
focal_class.original_string: public static String FORMAT_TABLE_COLUMN_WIDTH_THRESHOLD = "table.column.maxWidth";
focal_class.type: String
focal_class.var_name: FORMAT_TABLE_COLUMN_WIDTH_THRESHOLD
focal_class.declarator: FORMAT_COMPOSITE_FIELD_WIDTH_THRESHODL = "composite.field.maxWidth"
focal_class.modifier: public static
focal_class.original_string: public static String FORMAT_COMPOSITE_FIELD_WIDTH_THRESHODL = "composite.field.maxWidth";
focal_class.type: String
focal_class.var_name: FORMAT_COMPOSITE_FIELD_WIDTH_THRESHODL
focal_class.declarator: mserver
focal_class.modifier: private
focal_class.original_string: private MBeanServerConnection mserver;
focal_class.type: MBeanServerConnection
focal_class.var_name: mserver
focal_class.declarator: widthThresholdTable = 40
focal_class.modifier: private
focal_class.original_string: private int widthThresholdTable = 40;
focal_class.type: int
focal_class.var_name: widthThresholdTable
focal_class.declarator: widthThresholdComposite = 1000
focal_class.modifier: private
focal_class.original_string: private int widthThresholdComposite = 1000;
focal_class.type: int
focal_class.var_name: widthThresholdComposite
focal_class.declarator: ARRAY_MAP = new HashMap<String, Object>()
focal_class.modifier: static
focal_class.original_string: static Map<String, Object> ARRAY_MAP = new HashMap<String, Object>();
focal_class.type: Map<String, Object>
focal_class.var_name: ARRAY_MAP
focal_class.declarator: TYPE_MAP = new HashMap<String, String>()
focal_class.modifier: static
focal_class.original_string: static Map<String, String> TYPE_MAP = new HashMap<String, String>();
focal_class.type: Map<String, String>
focal_class.var_name: TYPE_MAP
focal_class.file: sjk-core/src/main/java/org/gridkit/jvmtool/MBeanHelper.java
focal_class.identifier: MBeanHelper
focal_class.class_method_signature: MBeanHelper.MBeanHelper(MBeanServerConnection connection)
focal_class.full_signature: public  MBeanHelper(MBeanServerConnection connection)
focal_class.identifier: MBeanHelper
focal_class.modifiers: public
focal_class.parameters: (MBeanServerConnection connection)
focal_class.signature:  MBeanHelper(MBeanServerConnection connection)
focal_class.class_method_signature: MBeanHelper.setFormatingOption(String name, Object value)
focal_class.full_signature: public void setFormatingOption(String name, Object value)
focal_class.identifier: setFormatingOption
focal_class.modifiers: public
focal_class.parameters: (String name, Object value)
focal_class.return: void
focal_class.signature: void setFormatingOption(String name, Object value)
focal_class.class_method_signature: MBeanHelper.getAttributeInfos(ObjectName bean, Collection<String> attrs, boolean read, boolean write)
focal_class.full_signature: private Map<String, MBeanAttributeInfo> getAttributeInfos(ObjectName bean, Collection<String> attrs, boolean read, boolean write)
focal_class.identifier: getAttributeInfos
focal_class.modifiers: private
focal_class.parameters: (ObjectName bean, Collection<String> attrs, boolean read, boolean write)
focal_class.return: Map<String, MBeanAttributeInfo>
focal_class.signature: Map<String, MBeanAttributeInfo> getAttributeInfos(ObjectName bean, Collection<String> attrs, boolean read, boolean write)
focal_class.class_method_signature: MBeanHelper.getAttributes(ObjectName bean, Collection<String> attrs)
focal_class.full_signature: private Map<String, Object> getAttributes(ObjectName bean, Collection<String> attrs)
focal_class.identifier: getAttributes
focal_class.modifiers: private
focal_class.parameters: (ObjectName bean, Collection<String> attrs)
focal_class.return: Map<String, Object>
focal_class.signature: Map<String, Object> getAttributes(ObjectName bean, Collection<String> attrs)
focal_class.class_method_signature: MBeanHelper.get(ObjectName bean, Collection<String> attrs)
focal_class.full_signature: public Map<String, String> get(ObjectName bean, Collection<String> attrs)
focal_class.identifier: get
focal_class.modifiers: public
focal_class.parameters: (ObjectName bean, Collection<String> attrs)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> get(ObjectName bean, Collection<String> attrs)
focal_class.class_method_signature: MBeanHelper.getAsTable(ObjectName bean, Collection<String> attrs, MTable table)
focal_class.full_signature: public void getAsTable(ObjectName bean, Collection<String> attrs, MTable table)
focal_class.identifier: getAsTable
focal_class.modifiers: public
focal_class.parameters: (ObjectName bean, Collection<String> attrs, MTable table)
focal_class.return: void
focal_class.signature: void getAsTable(ObjectName bean, Collection<String> attrs, MTable table)
focal_class.class_method_signature: MBeanHelper.set(ObjectName bean, String attr, String value)
focal_class.full_signature: public void set(ObjectName bean, String attr, String value)
focal_class.identifier: set
focal_class.modifiers: public
focal_class.parameters: (ObjectName bean, String attr, String value)
focal_class.return: void
focal_class.signature: void set(ObjectName bean, String attr, String value)
focal_class.class_method_signature: MBeanHelper.invoke(ObjectName bean, String operation, String... params)
focal_class.full_signature: public String invoke(ObjectName bean, String operation, String... params)
focal_class.identifier: invoke
focal_class.modifiers: public
focal_class.parameters: (ObjectName bean, String operation, String... params)
focal_class.return: String
focal_class.signature: String invoke(ObjectName bean, String operation, String... params)
focal_class.class_method_signature: MBeanHelper.format(Object v, String type)
focal_class.full_signature: private String format(Object v, String type)
focal_class.identifier: format
focal_class.modifiers: private
focal_class.parameters: (Object v, String type)
focal_class.return: String
focal_class.signature: String format(Object v, String type)
focal_class.class_method_signature: MBeanHelper.formatTable(List<String[]> content, int maxCell, boolean table)
focal_class.full_signature: private String formatTable(List<String[]> content, int maxCell, boolean table)
focal_class.identifier: formatTable
focal_class.modifiers: private
focal_class.parameters: (List<String[]> content, int maxCell, boolean table)
focal_class.return: String
focal_class.signature: String formatTable(List<String[]> content, int maxCell, boolean table)
focal_class.class_method_signature: MBeanHelper.formatLine(Object v, String type)
focal_class.full_signature: private String formatLine(Object v, String type)
focal_class.identifier: formatLine
focal_class.modifiers: private
focal_class.parameters: (Object v, String type)
focal_class.return: String
focal_class.signature: String formatLine(Object v, String type)
focal_class.class_method_signature: MBeanHelper.formatRow(CompositeData row, List<String> header)
focal_class.full_signature: private String[] formatRow(CompositeData row, List<String> header)
focal_class.identifier: formatRow
focal_class.modifiers: private
focal_class.parameters: (CompositeData row, List<String> header)
focal_class.return: String[]
focal_class.signature: String[] formatRow(CompositeData row, List<String> header)
focal_class.class_method_signature: MBeanHelper.convert(String value, String type)
focal_class.full_signature: private Object convert(String value, String type)
focal_class.identifier: convert
focal_class.modifiers: private
focal_class.parameters: (String value, String type)
focal_class.return: Object
focal_class.signature: Object convert(String value, String type)
focal_class.class_method_signature: MBeanHelper.describe(ObjectName bean)
focal_class.full_signature: public String describe(ObjectName bean)
focal_class.identifier: describe
focal_class.modifiers: public
focal_class.parameters: (ObjectName bean)
focal_class.return: String
focal_class.signature: String describe(ObjectName bean)
focal_class.class_method_signature: MBeanHelper.toPrintableType(String type)
focal_class.full_signature: static String toPrintableType(String type)
focal_class.identifier: toPrintableType
focal_class.modifiers: static
focal_class.parameters: (String type)
focal_class.return: String
focal_class.signature: String toPrintableType(String type)
focal_method.body: public String describe(ObjectName bean) throws Exception {
          MBeanInfo mbinfo = mserver.getMBeanInfo(bean);
          StringBuilder sb = new StringBuilder();
          sb.append(bean);
          sb.append('\n');
          sb.append(mbinfo.getClassName());
          sb.append('\n');
          sb.append(" - " + mbinfo.getDescription());
          sb.append('\n');
          for(MBeanAttributeInfo ai: mbinfo.getAttributes()) {
              sb.append(" (A) ");
              sb.append(ai.getName()).append(" : ").append(toPrintableType(ai.getType())).append("");
              if (!ai.isReadable()) {
                  sb.append(" - WRITEONLY");
              }
              else if (ai.isWritable()) {
                  sb.append(" - WRITEABLE");
              }
              sb.append('\n');
              if (!ai.getName().equals(ai.getDescription())) {
                  sb.append("  - " + ai.getDescription());
                  sb.append('\n');
              }
          }
          for (MBeanOperationInfo oi: mbinfo.getOperations()) {
              sb.append(" (O) ");
              sb.append(oi.getName()).append("(");
              for(MBeanParameterInfo pi: oi.getSignature()) {
                  String name = pi.getName();
                  String type = toPrintableType(pi.getType());
                  sb.append(type).append(' ').append(name).append(", ");
              }
              if (oi.getSignature().length > 0) {
                  sb.setLength(sb.length() - 2);
              }
              sb.append(") : ").append(toPrintableType(oi.getReturnType()));
              sb.append('\n');
              if (!oi.getName().equals(oi.getDescription())) {
                  sb.append("  - " + oi.getDescription());
                  sb.append('\n');
              }
          }
          return sb.toString();
      }
focal_method.class_method_signature: MBeanHelper.describe(ObjectName bean)
focal_method.full_signature: public String describe(ObjectName bean)
focal_method.identifier: describe
focal_method.invocations: getMBeanInfo append append append getClassName append append getDescription append getAttributes append append append append append getName toPrintableType getType isReadable append isWritable append append equals getName getDescription append getDescription append getOperations append append append getName getSignature getName toPrintableType getType append append append append getSignature setLength length append append toPrintableType getReturnType append equals getName getDescription append getDescription append toString
focal_method.modifiers: public
focal_method.parameters: (ObjectName bean)
focal_method.return: String
focal_method.signature: String describe(ObjectName bean)