Created
August 17, 2013 19:09
-
-
Save Gowiem/6258313 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The following method only returns the public static variables of the View class | |
// when called like so: | |
// Class klass = android.view.View.class; | |
// parser.getAllFieldsForClass(klass); | |
public Field[] getAllFieldsForClass(Class klass) { | |
Field[] fields = klass.getDeclaredFields(); | |
if (fields.length == 0) { | |
return new Field[0]; | |
} else { | |
return fields; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment