diff --git a/core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java b/core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java index 61e8d433e..4e6e28652 100644 --- a/core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java +++ b/core/src/main/java/com/taobao/arthas/core/util/ClassUtils.java @@ -56,7 +56,7 @@ public class ClassUtils { .row(label("classLoaderHash").style(Decoration.bold.bold()), label(StringUtils.classLoaderHash(clazz))); if (isPrintField) { - table.row(label("fields"), TypeRenderUtils.drawField(clazz, expand)); + table.row(label("fields").style(Decoration.bold.bold()), TypeRenderUtils.drawField(clazz, expand)); } return table; } diff --git a/core/src/main/java/com/taobao/arthas/core/util/TypeRenderUtils.java b/core/src/main/java/com/taobao/arthas/core/util/TypeRenderUtils.java index 27669e011..d6e2202ae 100644 --- a/core/src/main/java/com/taobao/arthas/core/util/TypeRenderUtils.java +++ b/core/src/main/java/com/taobao/arthas/core/util/TypeRenderUtils.java @@ -98,17 +98,17 @@ public class TypeRenderUtils { } public static Element drawField(Class clazz, Integer expand) { - TableElement fieldsTable = new TableElement().leftCellPadding(0).rightCellPadding(0); + TableElement fieldsTable = new TableElement(1).leftCellPadding(0).rightCellPadding(0); Field[] fields = clazz.getDeclaredFields(); if (fields == null || fields.length == 0) { return fieldsTable; } for (Field field : fields) { - TableElement fieldTable = new TableElement().leftCellPadding(0).rightCellPadding(0); - fieldTable.row("modifier", StringUtils.modifier(field.getModifiers(), ',')) + TableElement fieldTable = new TableElement().leftCellPadding(0).rightCellPadding(1); + fieldTable.row("name", field.getName()) .row("type", StringUtils.classname(field.getType())) - .row("name", field.getName()); + .row("modifier", StringUtils.modifier(field.getModifiers(), ',')); Annotation[] annotations = field.getAnnotations(); if (annotations != null && annotations.length > 0) {