Java tutorial
//package com.java2s; import java.lang.reflect.Field; public class Main { public static Field getDeclaredField(Class clazz, String name) { try { Field field = clazz.getDeclaredField(name); return field; } catch (NoSuchFieldException e) { e.printStackTrace(); } return null; } }