We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23ea60f commit 3addcd8Copy full SHA for 3addcd8
src/AndroidClient/client/src/main/java/net/servicestack/client/Utils.java
@@ -43,6 +43,24 @@ public static Double tryParseDouble(String str) {
43
}
44
45
46
+ public static Field[] getSerializableFields(Class type){
47
+ List<Field> fields = new ArrayList<Field>();
48
+ for (Class<?> c = type; c != null; c = c.getSuperclass()) {
49
+ if (c == Object.class)
50
+ break;
51
+
52
+ for (Field f : c.getDeclaredFields()) {
53
+ if (Modifier.isStatic(f.getModifiers()))
54
+ continue;
55
+ if (!Modifier.isPublic(f.getModifiers()))
56
57
58
+ fields.add(f);
59
+ }
60
61
+ return fields.toArray(new Field[fields.size()]);
62
63
64
public static void reverse(byte[] bytes) {
65
if (bytes == null)
66
return;
0 commit comments