sortFieldsByName function
Public properties first, then sort alphabetically
Implementation
int sortFieldsByName(String a, String b) {
final isAPrivate = isPrivateMember(a);
final isBPrivate = isPrivateMember(b);
if (isAPrivate && !isBPrivate) {
return 1;
}
if (!isAPrivate && isBPrivate) {
return -1;
}
return a.compareTo(b);
}