Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
");
for (int col = 0; col < data[row].length; col++) {
sb.append("
" + data[row][col] + "
");
}
sb.append("
");
}
sb.append("
");
return sb.toString();
}
private String fromObject() throws IllegalArgumentException, IllegalAccessException {
if (object == null)
return "";
final List fieldList = ReflectionUtil.getFieldsIgnoringAnnotation(object.getClass(), MarkupIgnore.class);
final StringBuilder sb = new StringBuilder();
final StringBuilder sb2 = new StringBuilder();
sb.append("
");
sb.append("");
final List list = Stream.of("").collect(Collectors.toList());
final List columnRowCount = Stream.of(0).collect(Collectors.toList());
if (object instanceof Map) {
appendMapItems(object, list, sb2, columnRowCount);
} else if (object instanceof List || object instanceof Set) {
appendListItems(object, list, sb2, columnRowCount);
} else if (object instanceof String) {
list.set(0, "
" + object.toString() + "
");
} else if (object.getClass().isArray()) {
appendArrayItems(object, list, sb2, columnRowCount);
} else if (!fieldList.isEmpty()) {
sb.append("
");
fieldList.forEach(x -> sb.append("
" + x.getName() + "
"));
sb.append("
");
for (Field f : fieldList) {
if (f != null && !f.isAccessible()) {
f.setAccessible(true);
}
if (f.getType().isAssignableFrom(Map.class)) {
appendMapItems(f.get(object), list, sb2, columnRowCount);
} else if (f.getType().isAssignableFrom(List.class) || f.getType().isAssignableFrom(Set.class)) {
appendListItems(f.get(object), list, sb2, columnRowCount);
} else if (f.getType().isArray()) {
appendArrayItems(f.get(object), list, sb2, columnRowCount);
} else {
list.set(0, list.get(0) + "