Sunday, June 17, 2007

Introduction - Java Reflection API

The Java Reflection API is a framework we can use for introspection of objects at run time. Learning about an object at run time can be very useful when writing dynamic code, programs that manipulate objects with properties unknown before runtime. We can learn of an object’s class, methods, fields, constructors, superclasses, and much more. We can create objects from classes that might not exist at compile time. Reflection can also be used extensively for debugging by changing the values of fields at run time as per our needs. Furthermore, through Reflection we can call methods that we do not know about until runtime. We can also use Reflection to manipulate arrays at runtime. more>>>

No comments: