|
|
@ -98,17 +98,17 @@ public class TypeRenderUtils {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static Element drawField(Class<?> clazz, Integer expand) {
|
|
|
|
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();
|
|
|
|
Field[] fields = clazz.getDeclaredFields();
|
|
|
|
if (fields == null || fields.length == 0) {
|
|
|
|
if (fields == null || fields.length == 0) {
|
|
|
|
return fieldsTable;
|
|
|
|
return fieldsTable;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (Field field : fields) {
|
|
|
|
for (Field field : fields) {
|
|
|
|
TableElement fieldTable = new TableElement().leftCellPadding(0).rightCellPadding(0);
|
|
|
|
TableElement fieldTable = new TableElement().leftCellPadding(0).rightCellPadding(1);
|
|
|
|
fieldTable.row("modifier", StringUtils.modifier(field.getModifiers(), ','))
|
|
|
|
fieldTable.row("name", field.getName())
|
|
|
|
.row("type", StringUtils.classname(field.getType()))
|
|
|
|
.row("type", StringUtils.classname(field.getType()))
|
|
|
|
.row("name", field.getName());
|
|
|
|
.row("modifier", StringUtils.modifier(field.getModifiers(), ','));
|
|
|
|
|
|
|
|
|
|
|
|
Annotation[] annotations = field.getAnnotations();
|
|
|
|
Annotation[] annotations = field.getAnnotations();
|
|
|
|
if (annotations != null && annotations.length > 0) {
|
|
|
|
if (annotations != null && annotations.length > 0) {
|
|
|
|