Java examples for Reflection:Generic
get Declared Fields from generic type
//package com.java2s; import java.lang.reflect.Field; public class Main { public static <T> Field[] getDeclaredFields(T item) { return item.getClass().getDeclaredFields(); }/*w w w . j a v a2s. c o m*/ }