Java tutorial
//package com.java2s; import java.lang.reflect.Field; import java.util.Arrays; import java.util.List; public class Main { public static List<Field> getFields(Class<?> clazz) { return Arrays.asList(clazz.getDeclaredFields()); } }