Java Reflection API

View All Reflection Java

What is Reflection API? Retrieve fields (instance variables) with data type Read the Constructors Retrieve all methods of current class and super classes Retrieve the fields (instance variables) of a class Knowing the interfaces implemented by a class Knowing the Super classes of a Class Getting Access Specifiers and Modifiers of a Class

Retrieve methods of current class and super classes

It is advised to read the notes on Java Reflection API before attempting the programs. Example on Retrieve methods of class import java.lang.reflect.Method; class Test { public void display() { } protected void exhibit() { } } public class Demo extends Test { public void show() { } protected void calculate() { } public static …

Retrieve methods of current class and super classes Read More »