Class targetClass = target.getClass();
Field[] publicFields = targetClass.getFields();
for (int i = 0; i < publicFields.length; i++) {
String fieldName = publicFields[i].getName();
Class typeClass = publicFields[i].getType();
String fieldType = typeClass.getName();
if (typeClass.isArray()) {
System.out.println("Name: " + fieldName +
", Type: " + fieldType);
}
}