This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Take a look at the Java Reflection API. If I understand your question, you can do what you are looking to do using reflection. Java Reflection in Action does a nice job of covering the API. Chapter 1 is available as a sample chapter download at the publishers website: http://manning.com/forman/. It will allow you to get up an running.