Java Reflection

Reflections At runtime Java can discover the definition and content of an object. With this information it becomes possible to manipulate the fields and behavior of the object.
  All API can discover how an object is built and what it can do at runtime.
java.lang.reflect package Using the reflection API, a program can determine a class accessible fields, methods and constructor at runtime.
  The JVM automatically creates instances of these classes Field, Method, Constructor for an object. These tell you what the class can do. A programmer can get instances of these classes.
  By using the Class object an instance of the class can be obtained by calling the getClass() method.
Class class forName((“Classname”) Returns the Class object associated with the class with the given string name.
  getFields() Returns an array containing Field objects reflecting all the accessible public fields of the class or interface represented by this Class object. Returns an array of length 0 if the class or interface has no accessible public fields, or if it represents an array type or a primitive type.
  getConstructors() Returns an array containing Constructor objects reflecting all the public constructors of the class represented by this Class object. An array of length 0 is returned if the class has no public constructors.
  getMethods() Returns an array containing Method objects reflecting all the public member methods of the class or interface represented by this Class object, including those declared by the class or interface and and those inherited from superclasses and superinterfaces
  The arrays describe the name, access control, visibility, keywords and other information for the entry.
  With these Field, Method, Constructor instances field values can bet set and get, methods can be invoked and create new instances.