Java tutorial
//package com.java2s; import java.lang.reflect.Field; import java.util.Arrays; import java.util.List; public class Main { /** * Return fields. * * @param clazz * the clazz * @return the list */ public static List<Field> returnFields(final Class<?> clazz) { return Arrays.asList(clazz.getDeclaredFields()); } }