static ArrayList<Field> getFields(Class<?> cls) {
		if (cls == null) return new ArrayList<Field>();
		ArrayList<Field> output = new ArrayList<Field>();
		Field fieldlist[];
		try {
			fieldlist = cls.getFields();
			output.addAll(Arrays.asList(fieldlist));

			fieldlist = cls.getDeclaredFields();
			for (int i = 0; i < fieldlist.length; i++ ) {
				Field fld = fieldlist[i];
				if (fld == null) continue;
				if (!output.contains(fld)) {
					output.add(fld);
				}
			}
		} catch (Throwable e) {

		}
		return output;
	}