Android examples for java.lang.reflect:Class
get Class Fields Count
//package com.java2s; import java.lang.reflect.Field; public class Main { public static int getFieldsCount(Class<?> bean) { Field[] fields = bean.getFields(); if (fields != null) { return fields.length; }// w w w . jav a 2 s .c o m return 0; } }