View RSS Feed

My Java Tips

  1. Java Reflection API - Overview

    by , 11-08-2011 at 06:08 PM (My Java Tips)
    Concept of Java reflection is very powerful. It gives you access to internal information about the classes (sub classes, methods, attributes) loaded into the JVM. This concept is not available in other programming languages like C and C++.

    Consider the following example. I have displayed the complete signatures of MyClass " methods using reflection. First of all, you should obtain a java.lang.Class object for the class that you want to manipulate. java.lang.Class " is ...