code: public static String[] getFieldNames(Class clazz) {
  	Field[] fields = clazz.getFields();
  	String[] names = new String[fields.length];
  	for (int i = 0; i < names.length; i++) {
  	    names[i] = fields[i].getName();
  	}
  	return names;
      }
docs: return all field names as String array
  
  @param clazz class to get field names from
  @return field names