I have a class with various variables
public class myClass{ public int id; public String category; public String description; public String star
What you are looking for is called "Reflection". It provides the ability at run-time to determine what fields and methods are contained within a class.
http://today.java.net/pub/a/today/2008/02/12/reflection-in-action.html